Created
November 27, 2022 00:57
-
-
Save samvarankashyap/42e2233f9328e119af98568e2278adf4 to your computer and use it in GitHub Desktop.
Telugu text to speech in python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fedora operating system | |
# prereq | |
# pip install google_speech | |
# sudo dnf install sox -y | |
import codecs | |
from google_speech import Speech | |
telugu_padyam=""" | |
సిరి దా వచ్చిన వచ్చును | |
సలలితముగ నారికేళ సలిలము భంగిన్ | |
సిరి దాఁ బోయిన బోవును | |
కరిమింగిన వెలగపండు కరణిని సుమతీ! | |
తాత్పర్యం: సంపద వచ్చినప్పుడు కొబ్బరికాయలోకి నీరు వచ్చిన విధంగా రమ్యంగానే ఉంటుంది. అలాగే పోయినప్పుడు ఏనుగు మింగిన వెలగపండులో గుంజు మాయమైనట్లే పోతుంది. | |
""" | |
language = "te" | |
speed = "1.05" | |
speech = Speech(telugu_padyam, language) | |
sox_effects = ("speed", speed) | |
speech.play(sox_effects) | |
speech.save("output.mp3") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment