120 likes | 275 Views
5526 Speech Recognition. Application of Sphinx-4 Yuan Hao. SPHINX-4. Providing a more flexible framework for research in speech recognition Written entirely in the Java programming language . ZipCity. A simple application for Sphinx-4.
E N D
5526 Speech Recognition Application of Sphinx-4 Yuan Hao
SPHINX-4 • Providing a more flexible framework for research in speech recognition • Written entirely in the Java programming language
ZipCity • A simple application for Sphinx-4. • ZipCity listens for the zip code and show the location related to the zip code.
ZipCity • What should we do if we don’t know the zip code, but we know the name of the city? Modify ZipCity!
Things we should modify • ZipCity.configer.xml • This document demonstrate the model and dictionary we use. Now, it only can recognize digit. • ZipCity.gram • ZipRecognizer.java • ZipDatabase.java
ZipCity.configer.xml • Change the dictionary path. • <property name="dictionaryPath" • value="resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/dict/cmudict.0.6d"/> • Change the filler path. • <property name="fillerPath" • value="resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/dict/fillerdict"/>
ZipCity.configer.xml • Change the acoustic model. • <property name="location" • value="resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz"/> • <property name="modelDefinition" • value="etc/WSJ_clean_13dCep_16k_40mel_130Hz_6800Hz.4000.mdef"/> • <property name="dataLocation" • value="cd_continuous_8gau/"/>
ZipCity.gram • Adjust the grammar • public <cityname> = <name>; • <name> = New-york | Cocoa | San-Francisco | Chicago | Houston | San-diego | Tallahassee | Titusville | Orlando | Miami | computer ;
ZipRecognizer.java • Add the city name we list in ZipCity.gram • Recognizer returen the value of “digitMap.put()”, so we should add the city name in digitMap code. • digitMap.put("chicago", "chicago"); digitMap.put("san-francisco", "san-francisco"); digitMap.put("new-york", "new-york");
ZipDatabase.java • Look up the info of city using city name instead of using zip code. • zipDB.put(city, new ZipInfo(zip, city, state,latitude, longitude))
Done! • Let’s see what happened!
Supplement • The grammar should be complete, and so do the dictionary. Now, it just contain 10 cities name. • This application also can recognize word, even that word is not a city name.