I'm working with Google's Web Speech API using Google Chrome (55.0.2883.87) and I'm experiencing some very weird behaviour.
When attempting to speak out names, followed by a number (like John 4
) it usually just speaks out the name and the number, as it should - but for some names it puts the word chapter
between the name and the number, so Daniel 4
becomes Daniel Chapter 4
.
I have picked up some random names and tested them with the following code:
<script>
var names = ['Brian', 'John', 'Mike', 'Julia', 'Daniel', 'Michael', 'David', 'Jason', 'Jack'];
names.forEach(function(name) {
var msg = new SpeechSynthesisUtterance(name + ' 4');
window.speechSynthesis.speak(msg);
});
</script>
The msg
variable doesn't include the word chapter when logging it with console.log()
Of these 9 names, the names John
and Daniel
are spoken with the word chapter
between them.
Question
Why does this happen, and which criteria determines which names are affected?