diff --git a/speech/clipboard_translator.sh b/speech/clipboard_translator.sh index d34a3a7..3445913 100755 --- a/speech/clipboard_translator.sh +++ b/speech/clipboard_translator.sh @@ -32,7 +32,7 @@ while pgrep -u "$USER" ^$1 &> /dev/null ; do continue fi if [[ "${newText}" =~ ^[0-9A-Za-z[:space:][:punct:]]+$ ]]; then - spd-say "$newText" + spd-say -- "$newText" echo "" | xclip -d "${DISPLAY:-:0}" -selection clipboard 2> /dev/null continue fi @@ -41,7 +41,7 @@ while pgrep -u "$USER" ^$1 &> /dev/null ; do $0~originalText { print $2; exitCode = 0; exit} END { exit exitCode }' "$dictionaryFile")" if [[ "${#translatedText}" -ge 1 ]]; then - spd-say "$translatedText" + spd-say -- "$translatedText" echo "" | xclip -d "${DISPLAY:-:0}" -selection clipboard 2> /dev/null continue fi @@ -49,6 +49,6 @@ while pgrep -u "$USER" ^$1 &> /dev/null ; do if ! [[ "${newText}" =~ ^[0-9[:punct:]]+$ ]]; then echo "${newText})==:[${translatedText}" >> "$dictionaryFile" fi - spd-say "$translatedText" + spd-say -- "$translatedText" echo "" | xclip -d "${DISPLAY:-:0}" -selection clipboard 2> /dev/null done diff --git a/speech/speak_window_title.sh b/speech/speak_window_title.sh index 4e8f9f1..c4a8c6b 100755 --- a/speech/speak_window_title.sh +++ b/speech/speak_window_title.sh @@ -16,7 +16,7 @@ while pgrep -u "$USER" ^$1 &> /dev/null ; do if [[ "$wnd_title" =~ $lookfor ]]; then wnd_title=${BASH_REMATCH[1]} if [[ "$old_title" != "$wnd_title" ]]; then - spd-say "$wnd_title" + spd-say -- "$wnd_title" old_title="$wnd_title" fi fi