Open JamesSeddonClaro opened 8 years ago
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)
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