3 ms·
Sure! We generated the rhyming words using the CMU Pronunciation Dictionary [1]. These were saved in a map, which mapped a word to its list of rhyming words. I
by nishs 9y ago
Sure!
We generated the rhyming words using the CMU Pronunciation Dictionary [1]. These were saved in a map, which mapped a word to its list of rhyming words. Initially, the rhyming words produced were short and uninteresting. So we repeated this process, but this time sorted the rhyming words by "coolness", which at its simplest, was a measure of the word's length and the number of phonemes. To save time, the map contained only 20k of the most popular English words. The map was encoded as JSON and served to the browser.
In the browser, the Web Speech API performed speech recognition. Each time we detected the end of a sentence, we used the last word to look up a list of rhyming words from the map. The rhyming words were then displayed in a randomized order. This continued in a loop.
There's also a tiny Q&A section in the video [2].
[1] http://www.speech.cs.cmu.edu/cgi-bin/cmudict http://www.speech.cs.cmu.edu/cgi-bin/cmudict
[2] https://youtu.be/M3aOPo5ofPU?t=47m50s https://youtu.be/M3aOPo5ofPU?t=47m50s