For example, the speech output of -5.6 is "five point six", not "negative five point six". The negative part is always missing. How to get speech output of negative numbers using festival speech synthesis?
Asked
Active
Viewed 187 times
1
1 Answers
0
The speech synthesis engine may produce more appropriate results if the input data uses an actual minus sign “−” (U+2212) to prefix negative numbers.
To replace all dashes “-” (U+002D) in front of digits with minus signs you may use this substitution command:
sed -re 's/\B-([0-9])/−\1/g' input.txt > output.txt

David Foerster
- 36,264
- 56
- 94
- 147
sed s/\B-([0-9])/negative \1/'
without having to know anything about howfestival
works. – Byte Commander Apr 11 '17 at 20:46