This project is a bash script named AIVoiceSearch.sh for a command-line interface (CLI) that takes voice input from the user, processes it with Terminal GPT (tgpt), and then uses the Google Text-to-Speech (gTTS) module to provide the response in voice to the user.
- Voice input and output: The script records the user's voice, transcribes it, and then synthesizes the response into audio and plays it.
- Uses tgpt: The transcribed text is processed with tgpt to generate a response.
- Cross-platform: The script can be run on macOS, Windows, and Linux.
- Audio Playback: The script uses
mpvto play the synthesized audio.
- Python 3.11 or higher
- Bash
- ffmpeg
- Vosk
- tgpt
- gTTS
- mpv
- Python: Python comes pre-installed on macOS. You can check the version by typing
python --versionin your terminal. If you need to install or upgrade Python, you can do so from the official Python website. - Bash: Bash also comes pre-installed on macOS.
- ffmpeg: Install ffmpeg using Homebrew. If you don't have Homebrew installed, you can install it from the Homebrew website, then run
brew install ffmpeg. - Vosk, tgpt, gTTS: These can be installed using pip, the Python package installer. Run
pip install vosk tgpt gTTS. - mpv: Install mpv using Homebrew by running
brew install mpv.
- Python: You can download Python for Windows from the official Python website.
- Bash: Git Bash is a good option for Windows users. You can download it from the Git SCM website.
- ffmpeg: You can download ffmpeg for Windows from the official ffmpeg website. Add the bin folder to your system path.
- Vosk, tgpt, gTTS: These can be installed using pip, the Python package installer. Run
pip install vosk tgpt gTTS. - mpv: You can download mpv for Windows from the official mpv website.
- Python: You can install Python using Scoop by running
scoop install python. - Bash: Git Bash can be installed using Scoop by running
scoop install git. - ffmpeg: Install ffmpeg using Scoop by running
scoop install ffmpeg. - Vosk, tgpt, gTTS: These can be installed using pip, the Python package installer. Run
pip install vosk tgpt gTTS. - mpv: Install mpv using Scoop by running
scoop install mpv.
- Python: You can install Python using Chocolatey by running
choco install python. - Bash: Git Bash can be installed using Chocolatey by running
choco install git. - ffmpeg: Install ffmpeg using Chocolatey by running
choco install ffmpeg. - Vosk, tgpt, gTTS: These can be installed using pip, the Python package installer. Run
pip install vosk tgpt gTTS. - mpv: Install mpv using Chocolatey by running
choco install mpv.
- Python: Most Linux distributions come with Python pre-installed. You can check the version by typing
python --versionin your terminal. If you need to install or upgrade Python, use your distribution's package manager. - Bash: Bash comes pre-installed on most Linux distributions.
- ffmpeg: Install ffmpeg using your distribution's package manager. For example, on Ubuntu, you would run
sudo apt install ffmpeg. - Vosk, tgpt, gTTS: These can be installed using pip, the Python package installer. Run
pip install vosk tgpt gTTS. - mpv: Install mpv using your distribution's package manager. For example, on Ubuntu, you would run
sudo apt install mpv.
To run the script, use the following command in your terminal:
bash AIVoiceSearch.sh