A simple Speech-to-Text (STT) and Text-to-Speech (TTS) tool.
# Create virtual environment
python -m venv venv
source venv/bin/activatepip install SpeechRecognition
pip install openai-whisperpip install gTTS
pip install piper-ttsDownload Piper voice model (example: en_US-lessac-medium):
python3 -m piper.download_voices en_US-lessac-mediumpython stt.py -i input.wav -o output/ -m whisperArguments:
-i, --input: Path to the input audio file (required)-o, --output: Path to the output directory (default:output)-m, --model: STT engine to use:whisperorgoogle(default:whisper)
python tts.py -i input.txt -o output/ -m piperArguments:
-i, --input: Path to the input text file (required)-o, --output: Path to the output directory (default:output)-m, --model: TTS engine to use:gtts→ outputs MP3 (default)piper→ outputs WAV