diff --git a/.gitignore b/.gitignore index ade51d6..3bd3447 100644 --- a/.gitignore +++ b/.gitignore @@ -193,4 +193,5 @@ gradle-app.setting .classpath rsc/* -!rsc/Ordnerstruktur.txt \ No newline at end of file +!rsc/Ordnerstruktur.txt +!rsc/tts.py \ No newline at end of file diff --git a/rsc/tts.py b/rsc/tts.py new file mode 100644 index 0000000..2d4a8d4 --- /dev/null +++ b/rsc/tts.py @@ -0,0 +1,18 @@ +import sys +from gtts import gTTS +import os +import argparse + +parser = argparse.ArgumentParser() +parser.add_argument("--text") +parser.add_argument("--lang") +parser.add_argument("--out") +args = parser.parse_args() + +mytext = args.text +language = args.lang +output = args.out + +myobj = gTTS(text=mytext, lang=language, slow=False) + +myobj.save(output) \ No newline at end of file