This is AI Chat that you can interact by sending the input via the message and AI model will reply the message back to you via the speech.
+-------------------+
| Ollama Server |
+-------------------+
▲
| (Streaming Text Response)
|
+-------------------+ 1. Sends |
| Frontend (React)| ----------> |
| | |
+-------------------+ |
| |
| 2. Sends text to |
| Python TTS Service |
v |
+-----------------------+ |
| Python TTS Service | |
+-----------------------+ |
| |
| 3. Returns audio path |
v |
+-----------------------+ |
| Audio File (WAV/MP3) | |
+-----------------------+ |
| |
v |
4. Frontend plays audio |
|
- Install Node version >= 20
- Running
npm ito install all dependencies
- Running this command to create virtual env for python
python3 -m venv myenv - Install Python version
3.10 - Install library using
pip3 install -r requirement.txt - Install Pytorch or using
pip3 install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 - Install transformer
pip3 install transformers==4.39.3- Install ffmpeg
brew install ffmpeg
- Run Ollama first in your local machine
- Run
npm run devto start FE - Run
uvicorn main:app --reloadto start TTS service