Changing pronunciation?
JamesSeddonClaro opened this issue · 1 comments
JamesSeddonClaro commented
I'm building a speaking calculator, so I need to change how speak.js reads the numeric function characters (+, -, *, /) to plus, minus, times and divide.
*Plus already works
yukulele commented
you can replace it in text before read it:
var translation = {
'+':'plus',
'-': 'minus',
'*': 'times',
'/': 'divide'
}
var myTranslatedText = mytext.replace(/[-+/*]/g, (a) => ' ' + replacer[a] + ' ')
meSpeak.speak(myTranslated)