-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3c8cbca
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
./TMBrain | ||
./TMBrain.pub | ||
./[email protected] | ||
./todo.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!bin/bash | ||
|
||
num=0 | ||
while [ $num -le 4 ] | ||
do | ||
Python tts.py | ||
mp3FileName=tempFile.mp3 | ||
scp $mp3FileName [email protected]:/home/TMBrain/Desktop | ||
printf "File has been sent\n" | ||
ssh [email protected] 'mpg123 /home/TMBrain/Desktop/tempFile.mp3;rm /home/TMBrain/Desktop/tempFile.mp3 ' | ||
done | ||
rm $mp3FileName | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from gtts import gTTS | ||
|
||
LANGUAGE = "en" | ||
|
||
def ttsGenerate(textStr): | ||
ttsObj = gTTS(text = textStr, lang = LANGUAGE, slow= False) | ||
ttsObj.save("tempFile.mp3") | ||
|
||
print("Enter Text to Generate") | ||
|
||
textToGen = input() | ||
|
||
ttsGenerate(textToGen) | ||
|
||
|
||
|
||
""" | ||
text = "Hello world, I am a tts test" | ||
ttsObj = gTTS(text=text,lang = 'en', slow=False) | ||
ttsObj.save("test.mp3") | ||
pygame.mixer.init() | ||
pygame.mixer.music.load("test.mp3") | ||
pygame.mixer.music.play() | ||
while pygame.mixer.music.get_busy(): | ||
time.sleep(1) | ||
pygame.mixer.music.stop() | ||
pygame.mixer.music.unload() | ||
if os.path.exists("test.mp3"): | ||
os.remove("test.mp3") | ||
else: | ||
print("The file doesnt exsit") | ||
""" |