SPOKEN LANGUAGE ACCENT DETECTION Probabilistic Accent Detection Using Hidden Markov Models Tre´ Calhoun La Vesha Parker Andrew Vaslas Nicolas Vera CornellUniversity CONTENTS Introduction iv PART I HTKSOFTWARESUITE 1 InstallationofHTKSoftware 2 1.1 GeneralInstallationinformation 2 1.2 MacOSX 2 1.3 Windows 3 2 TrainingandTestingCorpusAcquisition 5 2.1 TheOnlineSpeech/CorporaArchiveandAnalysisResource(OSCAAR) 5 3 TrainingCorpuswithHTK 7 3.1 RecordorInputSoundFiles 7 3.2 LabelingtheSoundFiles 8 4 CodingtheData 9 4.1 MelFrequencyCepstralCoefficients 9 4.2 Obtaining.mfccFiles 9 4.2.1 ConfigurationFile 9 4.2.2 TheCreationoftargetlist.txt 10 4.3 CommandLineActions 10 5 SettingParametersfortheHiddenMarkovModel 11 5.1 WhatisaHiddenMarkovModel? 11 5.2 HMMsandAccentDetection 12 5.2.1 Overview 12 5.2.2 HMMDefinition 12 5.2.3 Training 14 5.3 CommandLineActions 14 6 DefiningYourTask 16 6.1 DefineYourGrammar 16 6.2 DefineYourDictionary 17 6.3 GeneratingtheNetwork 17 7 Recognition 18 7.1 Procedure 18 7.2 CommandLineActions 18 PART II ERRORHANDLING,SOFTWAREUSEDANDRESOURCES A ErrorHandling 21 B SoftwareUsed 22 C References 24 References 25 iii INTRODUCTION Variousaccentsposeaproblemtoautomatedspeechrecognitionsoftware. Ifaccentscan bemoreeasilydetected,differentspokenlanguagemodelscanbeappliedtospeechrecog- nitionsoftwaretomakeforamorecorrectinterpretationofspokenlanguage. In this tutorial, we describe our exploration of Cambridge University’s Hidden Markov ModelToolkitasatooltouseforspokenaccentprediction. Weexploretheclassification ofthepronunciationoftheword”security”asspokenbynativeEnglishandnativeSpanish speakers. Weprovideadditionaldataindata general/forthosewhowishtoexploreadditional accentclassifications. PART I THE HIDDEN MARKOV MODEL TOOLKIT SOFTWARE SUITE CHAPTER 1 INSTALLATION OF HTK SOFTWARE 1.1 GeneralInstallationinformation The website for HTK can be found here. The HTK developers require that you register forausernameandpasswordthroughtheirsitebeforedownloadingtheirsoftware. After registering, visit the downloads page and download the HTK source code (available as a tarball). ItisalsousefultodownloadtheHTKBookasaPDF(availableonthedownloads page, below the software). If you do not wish to download the book, you can view the bookonlineafterregistering. 1.2 MacOSX In order to install HTK for Mac OS X, you first need to make sure that you have Xcode developertoolsandX11installed. WhatfollowsaretheinstallationinstructionstakendirectlyfromtheREADMEintheroot directory of the unziped htk/ directory, save a bit of formatting. We do not claim this work,andrepeatithereonlyforconvenience. 1.2.0.1 Compiling&InstallingHTKunderUNIX/Linux,OSXorCygwin Afterunpackingthesources,cdtothehtk/directory. TherearenowtwowaystoinstallHTK,the”traditional”andthe”new”. UptonowHTK hasalwaysinstalleditstoolsastheywerebuilt, andinstalledthemtoadirectorysuchas ”bin.linux”sothatbinariesfordifferentarchitecturescanbeinstalledinahomedirec- torysay.Ifyouwanttoinstallinthisway,pleaseaddtheoption”--enable-trad-htk” whenyourunconfigure. The”new”methodinstallsbydefaultinto/usr/local/bin(equivalenttoaconfigure optionof”--prefix=/usr/local”). 1. decidewhichoftheabovemethodsyouwishtouse 2. cdtohtk,thenrun./configure(withappropriateoptions,run”./configure --help”ifunsure). Ifyoudon’twanttobuildtheprogramsinHLMToolsaddthe –disable-hlmtoolsoption. 3. make all 4. make install Running”make install”willinstallthem. Thisstepmayneedtobedoneasroot, if youarenotinstallingtheminyourhomedirectory. NotesforparticularUnixvariants: Solaris:if”make”isn’tinstalledyoumayneedtoadd/opt/sfw/binand/usr/ccs/bin to your path and run ”./configure MAKE=gmake” with any other options you re- quire. Thenrun”gmake”insteadof”make”,alternativelyyoucancreateasymboliclink called”make”somewhereityourpathto/opt/sfw/bin/gmake 1.3 Windows Onceagain,whatfollowsaretheinstallationinstructionstakendirectlyfromtheREADME intherootdirectoryoftheunzipedhtk/ directory, saveabitofformatting. Wedonot claimthiswork,andrepeatithereonlyforconvenience. 1.3.0.2 Compiling&InstallingHTKunderWindows Prerequisites: HTKhasbeenverifiedtocompileusingMicrosoftVisualStudio. Fortesting,youwillrequireaPerlinterpretersuchasActivePerl. ProbabilisticAccentDetectionUsingHMMs. 3 ByCalhoun,Parker,Vaslas,andVera 4 INSTALLATIONOFHTKSOFTWARE You will need a tool such as 7-zip or winzip (commercial) for unpacking the HTK sourcecodearchive. ItitishelpfulifyouhavesomefamiliaritywithusingtheDOScommandlineinter- face,asyouwillneedtointeractwithitinordertocompile,installandrunHTK. EnsurethatyourPATHcontains: C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin Orifyouareusingolderversions: C:\Program Files\Microsoft Visual Studio\VC98\bin Compilation: 1. UnpacktheHTKsourcesusing7-zip. 2. OpenaDOScommandwindow: ClickStart,selectRuntypecmdatthepromptand clickOK. 3. cdintothedirectoryinwhichyouunpackedthesources. 4. cdintothehtk/directory. Type: cd htk 5. Createadirectoryforthelibraryandtools. Type: mkdir bin.win32 6. RunVCVARS32(itshouldbeinyourpath,seeprerequisitesabove) 7. BuildtheHTKLibrary,whichprovidesthecommonfunctionalityusedbytheHTK Tools. Enterthefollowingcommands: cd HTKLib nmake /f htk_htklib_nt.mkf all cd .. 8. BuildtheHTKTools cd HTKTools nmake /f htk_htktools_nt.mkf all cd .. cd HLMLib nmake /f htk_hlmlib_nt.mkf all cd .. cd HLMTools nmake /f htk_hlmtools_nt.mkf all cd .. Installation: TheHTKtoolshavenowbeenbuiltandareinthebin.win32directory. Youshouldadd this directory to your PATH, so that you can run them easily from the command line in future. CHAPTER 2 TRAINING AND TESTING CORPUS ACQUISITION Everyonehastherighttolife,libertyandsecurityofperson. —UnitedNations’DeclarationofHumanRights[4] 2.1 TheOnlineSpeech/CorporaArchiveandAnalysisResource(OSCAAR) Northwestern University’s Online Speech/Corpora Archive and Analysis Resource (OS- CAAR) is a collection of speech recordings from speakers with different backgrounds, assembledfromvariousdatasets. To request access to the data available through OSCAAR, you can submit a request for accesstotheOSCAARcollections. Inourexperience,requestsarehandledabout24–48 hoursafterbeingsent. The dataset that we found most appropriate for our goal of accent detection and classifi- cationistheALLSTARdatasetfromtheSpeechandCommunicationResearchGroupat NorthwesternUniversity. Thedatasetismassive,andwefoundthatasubsetofsamplesfit ourneedswell. Partofthedatasetfeaturesrecordingoftalkersfromdifferentbackgroundssaying20sen- tencespulledfromtheDeclarationofHumanRightsinEnglish. Forourproofofconcept, ProbabilisticAccentDetectionUsingHMMs. 5 ByCalhoun,Parker,Vaslas,andVera 6 TRAININGANDTESTINGCORPUSACQUISITION weusedasubsetofthatportionofspeakersreadingArticle3fromtheDHR:”Everyone hastherighttolifelibertyandsecurityofperson.”Thatsubsetofthedatafeaturedtalkers withthefollowingnativetongues: BrazilianPortuguese Korean English MandarinChinese French Persian(Farsi) German Russian Hebrew Spanish Hindi Turkish Japanese Vietnamese WeusetheSpanishandEnglishsamples,butmakeallofthemavailableindata general/.
Description: