Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Samir Paul authored and Samir Paul committed Sep 19, 2023
1 parent 80980e8 commit c31d09c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@
A machine learning project that translates voice from one language to another in real-time while preserving the tone and emotion of the speaker, and outputs the result in MP3 format.
</div>

### Dependencies
Python3, SpeechRecognition, pyaudio, google-trans-new, gTTS, playsound, deep-translator

### Getting started

1. Clone this project and create virtualenv (recommended) and activate virtualenv.
```
# Create virtualenv
virtualenv -p python3 env
# Linux/MacOS
source env/bin/activate
# Windows
env\Scripts\activate
```

2. Install require dependencies.
```
pip install -r requirements.txt
```

3. Run code and speech (have fun).
```
python main.py
```



### Problems and Solutions
- **Google Translate API error 404**: This error occurs when the Google Translate API is not available or the request is not valid. To fix this, we will use the ```deep_translator``` library instead of ```google_trans_new```.
- **Speech recognition does not work for continuous input**: The ```speech_recognition.Recognizer().listen()``` method does not work for continuous input data. To fix this, we will use the ```record()``` method with a timer.
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ google-trans-new
gTTS
playsound
deep-translator
subprocess.run
pyautogui

0 comments on commit c31d09c

Please sign in to comment.