This project provides a simple interface for converting MP3 and MP4 files to WAV format and translating the audio content from Chinese to other languages using Azure Cognitive Services.
- Convert MP3 and MP4 files to WAV format.
- Translate Chinese speech to English, Spanish, French, and German.
- Save translations to a text file.
- Python 3.6 or higher
- Azure Cognitive Services subscription key and region
azure-cognitiveservices-speech
Python packagegradio
Python packagepydub
Python package
- Clone the repository:
git clone https://github.com/your-username/speech-translation.git cd speech-translation
- Install the required packages:
pip install -r requirements.txt
- Set up your Azure Cognitive Services subscription key and region in the
speech_translation.py
file.export SPEECH_KEY=your_subscription_key export SPEECH_REGION=your_region
- Run the application:
python speech_translation.py