diff --git a/README.md b/README.md index 0f7356b..2d3d755 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,14 @@ https://github.com/coqui-ai/TTS --- +To install TTS, open a terminal and type the following command: + > $ pip install TTS ### FIX LONG UTTERANCES PROBLEM --- +In order to be able to process long sentences, follow the instructions in this link: https://dirk.net/2021/10/31/tts-fix-max-decoder-steps/ diff --git a/Sapo.sh b/Sapo.sh index a1907dc..c52e596 100755 --- a/Sapo.sh +++ b/Sapo.sh @@ -271,11 +271,11 @@ do 2) if [[ -e "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV ]];then killall mplayer;mplayer "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV & else notify-send "There is no file ""$DIRECTORY""Sapo_""$NAME"/"$ERROR_WAV"".";fi ;; 3) killall mplayer;s="$(yad --entry --width="600" --text="This is the original text of the line $ERROR_TEXT_LINE. - Edit as you wish, then hit OK to render." --entry-text="$TEXT_TO_CORRECT" --window-icon=$HOME/git/sapo/sapo-fix.png --title="Line $ERROR_TEXT_LINE - $NAME")";if [ $? -eq 0 ];then tts --text "$s" --out_path "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV;fi + Edit as you wish, then hit OK to render." --entry-text="$TEXT_TO_CORRECT" --window-icon=$HOME/git/sapo/sapo-fix.png --title="Line $ERROR_TEXT_LINE - $NAME")";if [ $? -eq 0 ];then tts --text "$s" --out_path "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV;mplayer "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV&fi ;; 4)killall mplayer;sox -V3 "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV "$DIRECTORY""Sapo_""$NAME"/temp.wav silence 1 0.50 0.1% 1 0.5 0.1%;sox "$DIRECTORY""Sapo_""$NAME"/temp.wav "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV pad 0 0.5;rm "$DIRECTORY""Sapo_""$NAME"/temp.wav ;; - 5)killall mplayer;s="$(yad --entry --width="600" --text="Split the printed text roughly in half with the pipe symbol (|), so that it can be rendered in two batches: " --entry-text="$TEXT_TO_CORRECT" --window-icon=$HOME/git/sapo/sapo-fix.png --title="Line $ERROR_TEXT_LINE - $NAME")";if [ $? -eq 0 ];then s1="$(echo $s|sed 's/|.*$//')";s2="$(echo $s|sed 's/^.*|//')"; echo $s1;echo $s2 ; tts --text "$s1" --out_path "$DIRECTORY""Sapo_""$NAME"/1temp.wav; tts --text "$s2" --out_path "$DIRECTORY""Sapo_""$NAME"/2temp.wav;sox "$DIRECTORY""Sapo_""$NAME"/1temp.wav "$DIRECTORY""Sapo_""$NAME"/2temp.wav "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV ; rm "$DIRECTORY""Sapo_""$NAME"/1temp.wav "$DIRECTORY""Sapo_""$NAME"/2temp.wav;fi + 5)killall mplayer;s="$(yad --entry --width="600" --text="Split the printed text roughly in half with the pipe symbol (|), so that it can be rendered in two batches: " --entry-text="$TEXT_TO_CORRECT" --window-icon=$HOME/git/sapo/sapo-fix.png --title="Line $ERROR_TEXT_LINE - $NAME")";if [ $? -eq 0 ];then s1="$(echo $s|sed 's/|.*$//')";s2="$(echo $s|sed 's/^.*|//')"; echo $s1;echo $s2 ; tts --text "$s1" --out_path "$DIRECTORY""Sapo_""$NAME"/1temp.wav; tts --text "$s2" --out_path "$DIRECTORY""Sapo_""$NAME"/2temp.wav;sox "$DIRECTORY""Sapo_""$NAME"/1temp.wav "$DIRECTORY""Sapo_""$NAME"/2temp.wav "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV ; rm "$DIRECTORY""Sapo_""$NAME"/1temp.wav "$DIRECTORY""Sapo_""$NAME"/2temp.wav;mplayer "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV&fi ;; 6) if [[ -e "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV ]];then rm "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV;notify-send "$DIRECTORY""Sapo_""$NAME"/"$ERROR_WAV"" has been deleted."; else notify-send "There is no file ""$DIRECTORY""Sapo_""$NAME"/"$ERROR_WAV"". Already deleted?";fi;GO=true ;; diff --git a/letters.sed b/letters.sed index b89ef16..596e3e8 100644 --- a/letters.sed +++ b/letters.sed @@ -1,5 +1,5 @@ s/\(.*\)/\L\1/ -s/ê/e/g;s/è/e/g;s/é/e/g;s/ë/e/g;s/â/a/g;s/à/a/g;s/ô/o/g;s/ó/o/g;s/ò/o/g;s/ú/u/g;s/ù/u/g;s/û/u/g;s/ü/u/g;s/î/i/g;s/ì/i/g;s/ï/i/g;s/ç/s/g +s/ê/e/g;s/è/e/g;s/é/e/g;s/ë/e/g;s/â/a/g;s/à/a/g;s/ô/o/g;s/ó/o/g;s/ò/o/g;s/ú/u/g;s/ù/u/g;s/û/u/g;s/ü/u/g;s/î/i/g;s/ì/i/g;s/ï/i/g;s/í/i/g;s/ç/s/g s/\/bee/g s/\/see/g s/\/dee/g diff --git a/sample.txt b/sample.txt deleted file mode 100644 index 8b36bfb..0000000 --- a/sample.txt +++ /dev/null @@ -1,4 +0,0 @@ -A year passed, and so, trapped in a daily routine like a noose around in his throat, but also a young man whose blood was boiling, Andrew came out of the strict stereotypes of the family and dared. -He dared to look at a girl in his neighborhood. -A very beautiful girl, 2 years younger. -A strong, passionate love erupted. diff --git a/sample.wav b/sample.wav deleted file mode 100644 index 107b081..0000000 Binary files a/sample.wav and /dev/null differ diff --git a/sapo-fix.sh b/sapo-fix.sh index ef319b6..b3aa2fb 100755 --- a/sapo-fix.sh +++ b/sapo-fix.sh @@ -101,11 +101,11 @@ do 2) if [[ -e "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV ]];then killall mplayer;mplayer "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV & else notify-send "There is no file ""$DIRECTORY""Sapo_""$NAME"/"$ERROR_WAV"".";fi ;; 3) killall mplayer;s="$(yad --entry --width="600" --text="This is the original text of the line $ERROR_TEXT_LINE. - Edit as you wish, then hit OK to render." --entry-text="$TEXT_TO_CORRECT" --window-icon=$HOME/git/sapo/sapo-fix.png --title="Line $ERROR_TEXT_LINE - $NAME")";if [ $? -eq 0 ];then tts --text "$s" --out_path "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV;fi + Edit as you wish, then hit OK to render." --entry-text="$TEXT_TO_CORRECT" --window-icon=$HOME/git/sapo/sapo-fix.png --title="Line $ERROR_TEXT_LINE - $NAME")";if [ $? -eq 0 ];then tts --text "$s" --out_path "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV;mplayer "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV&fi ;; 4)killall mplayer;sox -V3 "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV "$DIRECTORY""Sapo_""$NAME"/temp.wav silence 1 0.50 0.1% 1 0.5 0.1%;sox "$DIRECTORY""Sapo_""$NAME"/temp.wav "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV pad 0 0.5;rm "$DIRECTORY""Sapo_""$NAME"/temp.wav ;; - 5)killall mplayer;s="$(yad --entry --width="600" --text="Split the printed text roughly in half with the pipe symbol (|), so that it can be rendered in two batches: " --entry-text="$TEXT_TO_CORRECT" --window-icon=$HOME/git/sapo/sapo-fix.png --title="Line $ERROR_TEXT_LINE - $NAME")";if [ $? -eq 0 ];then s1="$(echo $s|sed 's/|.*$//')";s2="$(echo $s|sed 's/^.*|//')"; echo $s1;echo $s2 ; tts --text "$s1" --out_path "$DIRECTORY""Sapo_""$NAME"/1temp.wav; tts --text "$s2" --out_path "$DIRECTORY""Sapo_""$NAME"/2temp.wav;sox "$DIRECTORY""Sapo_""$NAME"/1temp.wav "$DIRECTORY""Sapo_""$NAME"/2temp.wav "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV ; rm "$DIRECTORY""Sapo_""$NAME"/1temp.wav "$DIRECTORY""Sapo_""$NAME"/2temp.wav;fi + 5)killall mplayer;s="$(yad --entry --width="600" --text="Split the printed text roughly in half with the pipe symbol (|), so that it can be rendered in two batches: " --entry-text="$TEXT_TO_CORRECT" --window-icon=$HOME/git/sapo/sapo-fix.png --title="Line $ERROR_TEXT_LINE - $NAME")";if [ $? -eq 0 ];then s1="$(echo $s|sed 's/|.*$//')";s2="$(echo $s|sed 's/^.*|//')"; echo $s1;echo $s2 ; tts --text "$s1" --out_path "$DIRECTORY""Sapo_""$NAME"/1temp.wav; tts --text "$s2" --out_path "$DIRECTORY""Sapo_""$NAME"/2temp.wav;sox "$DIRECTORY""Sapo_""$NAME"/1temp.wav "$DIRECTORY""Sapo_""$NAME"/2temp.wav "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV ; rm "$DIRECTORY""Sapo_""$NAME"/1temp.wav "$DIRECTORY""Sapo_""$NAME"/2temp.wav;mplayer "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV&fi ;; 6)killall mplayer; if [[ -e "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV ]];then rm "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV;notify-send "$DIRECTORY""Sapo_""$NAME"/"$ERROR_WAV"" has been deleted."; else notify-send "There is no file ""$DIRECTORY""Sapo_""$NAME"/"$ERROR_WAV"". Already deleted?";fi;GO=true ;; diff --git a/screenshots/5.png b/screenshots/5.png index bc1fca0..2536aa9 100644 Binary files a/screenshots/5.png and b/screenshots/5.png differ