This is a simple command-line interface (CLI) application that interacts with Azure's Speech Services. It provides functionalities for text-to-speech and speech-to-text conversion.
- Python 3.7 or later
- An Azure account with an active subscription
-
Clone the repository:
git clone https://github.com/yourusername/your-repo-name.git
-
Navigate into the directory:
cd your-repo-name
-
Install the required Python packages:
pip install -r requirements.txt
-
Configure environment variables:
Rename the
.env.example
file to.env
and fill in your Azure Speech Services key and region:cp .env.example .env nano .env
Then, fill in your Azure Speech Services key and region:
SPEECH_KEY=your-key-here SPEECH_REGION=your-region-here
-
Text-to-Speech:
To convert text to speech, use the
text-speech
mode and provide the text you want to convert:python main.py --mode=text-speech --text='Your text here'
-
Speech-to-Text:
To convert speech to text, use the
speech-text
mode:python main.py --mode=speech-text
If you want to enable continuous recognition mode, add the
--continuous
flag:python main.py --mode=speech-text --continuous
Press any key to stop continuous recognition.
This project is licensed under the MIT License. See the LICENSE file for more details.