![]() The code uses os.system to play the output audio file, this command works out of the box in Windows, in Linux you may need a command-line player like MPG321 (which can be installed using sudo apt-get install mpg321) You need to install g TTS package (available through PIP). When I posted the above code, I got a reader request for a code that does the reverse – to speak out loud a sentence of given Tamil text. Print ("What you spoke (Google):", WhatUSpoke) WhatUSpoke = r.recognize_google (audio, language="ta-IN") ![]() Print ("Say Something in Tamil and pause, no need to press any key") # pip install PyAudio-0.2.11-cp37-cp37m-win_amd64.whl and NOT pip install PyAudio (Works only in Linux) You need to install SpeechRecognitionpackage (available through PIP) and PyAudio (available through PIP in Linux, but on Windows, you need to install appropriate package from here). And after that, in reverse, that is, to speak out loud a sentence of given Tamil text. In a matter of minutes, I was able to build a rudimentary speech to text recognition app, for Tamil.
0 Comments
Leave a Reply. |