update Sapo.sh(delimitation, play audio correction)

main
Christos Angelopoulos 2022-03-22 01:25:38 +02:00
parent b531e8adba
commit 0ecb7dd084
1 changed files with 3 additions and 2 deletions

View File

@ -45,7 +45,8 @@ sed -i 's/^\.$//g' "$DIRECTORY""Sapo_""$NAME"/"$NAME"sentenced.txt # get rid of
sed -i "s/^'//g" "$DIRECTORY""Sapo_""$NAME"/"$NAME"sentenced.txt #get rid of ' at start of line
sed -i 's/^Ey /A /g' "$DIRECTORY""Sapo_""$NAME"/"$NAME"sentenced.txt # A's at line start are usually articles, not capitals
#sed -i 's/\,/\n/3' "$DIRECTORY""Sapo_""$NAME"/"$NAME"sentenced.txt # delimit to 3rd occurence of ,
sed -i "s/—/ — /g" "$DIRECTORY""Sapo_""$NAME"/"$NAME"sentenced.txt # put spaces around —, to not interfere with pronunciation
#sed -i "s/—/ — /g" "$DIRECTORY""Sapo_""$NAME"/"$NAME"sentenced.txt # put spaces around —, to not interfere with pronunciation
sed -i "s/—/\,/g" "$DIRECTORY""Sapo_""$NAME"/"$NAME"sentenced.txt # convert — to ,
##################extra delimit to comma and space ###################################
DELIM=$(cat "$DIRECTORY""Sapo_""$NAME"/"$NAME"sentenced.txt|wc -l)
while [ $DELIM -ge 1 ]
@ -220,7 +221,7 @@ do
;;
1) GO=true;exit
;;
2) celluloid "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV &
2) if [[ -e "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV ]];then celluloid "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV & ; else notify-send "There is no file ""$DIRECTORY""Sapo_""$NAME"/"$ERROR_WAV"".";fi
;;
3) 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.png --title="Line $ERROR_TEXT_LINE - $NAME")";tts --text "$s" --out_path "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV