Record English speech and translate it to Spanish text.
This script is a combination of two scripts (see Credit section below) that allows you to record your English speech through your PC Mic and have it translated and displayed to the screen in Spanish. Thus giving you a live closed caption of your presentation.
Enjoy!
In order to use the Bing translate API you must first register your application and update the
translator = Translator('<Your Client ID>', '<Your Client Secret>')
line in livecc.py
To register your application with Azure DataMarket, visit https://datamarket.azure.com/developer/applications/.
If you do not yet have a developer account or haven't yet signed up for Bing Translate go here first: https://datamarket.azure.com/dataset/1899a118-d202-492c-aa16-ba21c33c06cb.
Click on “Register”. In the “Register your application” dialog box, you can define your own Client ID and Name. The redirect URI is not used for the Microsoft Translator API. However, the redirect URI field is a mandatory field, and you must provide a URI to obtain the access code. A description is optional.
On Windows you will need to include the flac.exe file in the same folder as livecc.py
You can download a zip of all the FLAC command line tools here: http://sourceforge.net/projects/flac/files/flac-win/
When you unzip the file you will find flac.exe in the /bin folder.
Feel free to fork and send pull requests. Contributions welcome.
Microsoft-Translator-Python-API
python-google-speech-scripts is released under the MIT LICENSE.
Microsoft-Translator-Python-API is released under the Openlabs LICENSE.