gaf3 / hundoword

The 100 words every child needs to learn
0 stars 0 forks source link

Figure out how to do audio #23

Closed gaf3 closed 8 years ago

gaf3 commented 8 years ago

Need a way to take word and get the audio for it.

gaf3 commented 8 years ago

http://www.dictionaryapi.com/products/api-collegiate-dictionary.htm

gaf3 commented 8 years ago

http://www.macmillandictionary.com/us/dictionary/american/he

Which redirects to:

http://www.macmillandictionary.com/us/dictionary/american/he_1

Sound is at:

<span class="PRONS">
<span class="SEP" space="yes" context="PRONS-before"> </span>
<span class="QUALIFIER">strong</span>
<img class="sound audio_play_button" style="cursor: pointer" data-src-ogg="http://www.macmillandictionary.com/us/media/american/us_pron_ogg/h/he_/he_Am/he_American_English_pronunciation_23937.ogg" data-src-mp3="http://www.macmillandictionary.com/us/media/american/us_pron/h/he_/he_Am/he_American_English_pronunciation_23937.mp3" title="he pronunciation in American English" onclick="ga('send', 'event', 'entry', 'pronaudio', 'http://www.macmillandictionary.com/us/media/american/us_pron/h/he_/he_Am/he_American_English_pronunciation_23937.mp3');" alt="he pronunciation in American English" src="http://www.macmillandictionary.com/us/external/images/redspeaker.gif?version=2015-09-07-1650">
<span class="PRON" show_less="no">
</span>
<span class="PRONS">
<span class="SEP" space="yes" context="PRONS-before"> </span>
<span class="QUALIFIER">weak</span>
<img class="sound audio_play_button" style="cursor: pointer" data-src-ogg="http://www.macmillandictionary.com/us/media/american/us_pron_ogg/h/he_/he_Am/he_American_English_pronunciation_23935.ogg" data-src-mp3="http://www.macmillandictionary.com/us/media/american/us_pron/h/he_/he_Am/he_American_English_pronunciation_23935.mp3" title="he pronunciation in American English" onclick="ga('send', 'event', 'entry', 'pronaudio', 'http://www.macmillandictionary.com/us/media/american/us_pron/h/he_/he_Am/he_American_English_pronunciation_23935.mp3');" alt="he pronunciation in American English" src="http://www.macmillandictionary.com/us/external/images/redspeaker.gif?version=2015-09-07-1650">
<span class="PRON" show_less="no">
</span>
gaf3 commented 8 years ago

Going with http://api.forvo.com/ for now.