GDSC-RCCIIT / General-Purpose-Scripts

A repository containing several general purpose Python scripts to automate daily and common tasks.
GNU General Public License v3.0
49 stars 116 forks source link

Added text to audio convertor #365

Closed lovishprabhakar closed 2 years ago

lovishprabhakar commented 2 years ago

Description

Added text to audio convertor script that converts the given text to audio and makes the computer speak it (like an AI).

Fixes #361

Type of change

Please delete options that are not relevant.

Has This Been Tested?

(Can't show audio output via screenshot.)

Checklist:

lovishprabhakar commented 2 years ago

Please improve the overall quality of the script, currently it looks and feels very low effort. Add some input checks to verify the input is right. Also add the option of reading input from a file or from stdin.

@OBITORASU Done sir. Added the following features:

  1. Firstly, asking the users whether they want to give text input by typing or by extracting the text from a .txt file.
  2. If input is given by typing, added an input check. If the user inputs a blank string(or only blank spaces), a Please enter correct value audio will be played.(same will be done in case of extracting text from a .txt file, if the file doesn't contain any text )
  3. The converted audio will also be saved as voice.mp3 in the same directory as txt_to_aud.py.
github-actions[bot] commented 2 years ago

Stale pull request message