Transcription of Speech Recognition Reference Design on the …
1 TI Voice TriggerOLED DisplayCC5535 eZdspMicTI Voice Trigger1 TIDUBJ5A March2016 RevisedMay 2016 SubmitDocumentationFeedbackCopyright 2016,TexasInstrumentsIncorporatedSpeechR ecognitionReferenceDesignontheC5535eZdsp TI DesignsSpeechRecognitionReferenceDesigno n theC5535eZdsp eZdsp,CodeComposerStudio,PowerTune,DSP/B IOSare trademarksof a registeredtrademarkof a registeredtrademarkof a registeredtrademarkof a trademarkof SD-3C, othertrademarksare the propertyof DesignsThis TI designhighlightsthe voicerecognitioncapabilitiesof the C5535and C5545devicesusingtheTI embeddedspeechrecognition(TIesr)librarya ndinstructshow to run a voicetriggeringexamplethatprintsa preprogrammedkeywordon the C5535eZdspOLED screen,basedon a designalso describesthe stepstocustomizethe speechrecognitioncapabilityof the C5535andC5545devicesshowcasesthe performanceandversatilityof this low-power, DesignFilesTMDX5535eZdspToolFolderTMS320 C5535 ProductFolderTMS320C5545 ProductFolderTLV320 AIC3204 ProductFolderASKOur E2E ExpertsDesignFeatures IncludesSoftwareSource,Schematics,Bill ofMaterials,and DesignFiles.
2 Applicableto Any ApplicationRequiringVoiceTriggering. VoiceTriggeringfor EmbeddedDevices AcousticAnalysis WirelessAudioDevices(for example,HeadsetsMicrophones,and Speakerphones) IndustrialControlsAn IMPORTANTNOTICEat the end of this TI referencedesignaddressesauthorizeduse, intellectualpropertymattersand otherimportantdisclaimersand Interface64KB DARAM128KB ROMS witched Central Resource (SCR)InputClocksC55x DSP CPUDSP SystemPeripheralsI S(x4)2I C2 SPIUARTS erial InterfacesDMA(x4)InterconnectProgram/Dat aStorageeMMC/SDSDHC(x2)No SARAMTMS320C5532 TMS320C5533 TMS320C5534 TMS320C553564KB SARAM192KB SARAM256KB SARAMFFT HardwareAcceleratorTMS320C5534 USB (HS)[DEVICE]ConnectivityTMS320C5533 NotApplicableTMS320C5532 TMS320C553510-BitSARADCA pplicationSpecificLCDB ridgeDisplayGP Timer(x2)RTCGP Timeror WDSystemUSB_LDODSP_LDOTMS320C5533 TMS320C5532 TMS320C5535 March2016 RevisedMay 2016 SubmitDocumentationFeedbackCopyright 2016.
3 TexasInstrumentsIncorporatedSpeechRecogn itionReferenceDesignontheC5535eZdsp 1 SystemDescriptionThe C5535/C5545fixed-pointDSPis basedon the C55xDSParchitectureachieveshigh performanceand low powerthroughincreasedparallelismand focuson low-costDSPworkswell in embeddedspeechrecognitionapplicationsand this referencedesignshowcasesthis designcontainsreferenceC codeand binariesto run a voicetriggerdemonstrationthat detectsa keywordphrasespokeninto the microphoneof the C5535eZdsp C5545 Fixed-PintDigitalSignalProcessorsThe C5535and C5545 DSPssamplethe incomingaudiodataand makedecisionson whetherthekeywordphraseTIvoicetriggerhas beenrecognizedwith the assistanceof the TI embeddedspeechrecognition(TIesr) describesthe algorithmand the variousthreadsthe moreinformation,see C5535and C5545 SoCArchitectureTI Voice TriggerOLED DisplayCC5535 eZdspMicTI Voice March2016 RevisedMay 2016 SubmitDocumentationFeedbackCopyright 2016,TexasInstrumentsIncorporatedSpeechR ecognitionReferenceDesignontheC5535eZdsp 2 BlockDiagramFigure2 showsthe blockdiagramof the referencedesignfeaturesthe C5545 DSP Core.
4 High-performance,low-power,TMS320C55xfix ed-pointdigitalsignalprocessor 20-, 10-nsinstructioncycletime 50- (60- on C5545),100-MHzclockrate One or two instructionsexecutedper cycle Dualmultiply-and-accumulateunits(up to 200 millionmultiply-accumulatesper second[MMACS]) Two arithmeticand logicunits(ALUs) Threeinternaldataand operandreadbusesand two internaldataand operandwritebuses Software-compatiblewith C55xdevices Industrialtemperaturedevicesavailable 320 KBof zero-waitstateon-chipRAMcomposedof the following: 64 KBof dual-accessRAM(DARAM),8 blocksof 4K 16 bit 256 KBof single-accessRAM(SARAM),32 blocksof 4K 16 bit 128 KBof zerowait-stateon-chipROM(4 blocksof 16K 16 bit) TightlycoupledFFT hardwareaccelerator Peripheral: Directmemoryaccess(DMA)controller FourDMAwith 4 channelseach(16 channelstotal) Three32-bitgeneral-purpose(GP)timers One selectableas a watchdogor GP Two embeddedmultimediacards(eMMCs)or securedigital(SD)interfaces Universalasynchronousreceiver/transmitte r(UART) Serialport interface(SPI)with four chip selects Masterand slaveinter-intergratedcircuit(I2C bus) Fourinter-ICsound(I2S bus)for datatransport DeviceUSBport with high-speedPHYthat supportsthe following.
5 Full- and high-speeddevices LCDbridgewith asynchronousinterface 10-bit,4-inputsuccessiveapproximation(SA R)analog-to-digitalconverter(ADC) (JTAG)boundary-scan-compatible 32 general-purposeI/O (GPIO)pins (multiplexedwith otherdevicefunctions) March2016 RevisedMay 2016 SubmitDocumentationFeedbackCopyright 2016,TexasInstrumentsIncorporatedSpeechR ecognitionReferenceDesignontheC5535eZdsp Configuresup to 20 GPIO pins simultaneously Power: Fourcoreisolatedpowersupplydomains: Analog RTC CPUand Peripherals USB ThreeI/O isolatedpowersupplydomains: RTCI/O USBPHY DVDDIO ThreeintegratedLDOs(DSP_LDO,ANA_LDO,and USB_LDO)to powerthe isolateddomains:DSPcore,Analog,and USBcore,respectively (50 MHz), , , ,or (100 MHz), , , ,or Clock: Real-timeclock(RTC)with crystalinput,separateclockdomain,and separatepowersupply Low-powersoftwareprogrammablephase-locke dloop (PLL)clockgenerator Bootloader: On-chipROMbootloader(RBL)to bootfromSPI EEPROM,SPI serialflashor I2C EEPROMeMMC,SD, SDHC,UART,and USB Package.
6 144-terminalPb-freeplasticball grid array(BGA)(ZHHS uffix)For moreinformationon eachof thesedevices,see the respectiveproductfoldersat March2016 RevisedMay 2016 SubmitDocumentationFeedbackCopyright 2016,TexasInstrumentsIncorporatedSpeechR ecognitionReferenceDesignontheC5535eZdsp TMDX5535eZdspis a smallformfactor,low-costUSB-poweredDSPde velopmentkit that includeshardwareand softwarerequiredto evaluatethe C553xgeneration,whichis the lowest-costand lowest-power16-bitDSPof the low-costkit allowsquickand easyevaluationof the advancedcapabilitiesof the C5532,C5533,C5534,C5535and kit has an on-boardXDS100emulatorfor full source-leveldebugcapabilityand supportsCodeComposerStudio (CCS).Key features: SmallformfactorDSPdevelopmentkit for the C5535and C5545processors TMS320C5535fixed-point,ultra-low-powerDS P EmbeddedXDS100emulator 8-MBserialflashmemory TLV320 AIC3204programmablelow-powerstereoaudioc odec high speed microSD cardslot with 2-GBmicroSD card Line-in/Mic-inand headphone-outaudiojacks Earphonewith mic 60-pinexpansionconnector 96 16-pixelOLED display Two pushbuttonsFigure3 showsthe March2016 RevisedMay 2016 SubmitDocumentationFeedbackCopyright 2016,TexasInstrumentsIncorporatedSpeechR ecognitionReferenceDesignontheC5535eZdsp TLV320 AIC3204device(alsocalledthe AIC3204)is a flexible,low-power,low-voltagestereoaudi ocodecwith programmableinputsand outputs,PowerTune capabilities,fixedpredefinedandparameter izablesignal-processingblocks,integrated PLL,integratedLDOs,and.
7 StereoaudioDACwith 100-dBSNR ,48-kspsDACplayback StereoaudioADCwith 93-dBSNR ,48-kspsADCrecord PowerTune Extensivesignal-processingoptions Six single-endedor threefully-differentialanaloginputs Stereoanalogand digitalmicrophoneinputs Stereoheadphoneoutputs Stereoline outputs Low-noisePGA Low-poweranalogbypassmode Programmablemicrophonebias ProgrammablePLL IntegratedLDO 5 mm 5 mm 32-pinQFNpackageApplicationSpeechRecogni tionGrammarSpecificationHMMInfoDecisionT reesDictionaryTIesr FlexTIesr DictTIesr DTTIesr SITIesr FATIesr EngineCoreTIesr EngineSINetwork &HMMM odelsOSAudioAPIDataThreaded March2016 RevisedMay 2016 SubmitDocumentationFeedbackCopyright 2016,TexasInstrumentsIncorporatedSpeechR ecognitionReferenceDesignontheC5535eZdsp 3 SystemDesignTheoryThe speechrecognitionreferencedemonstrationu sesthe TI embeddedspeechrecognitionlibrary(TIesr)a nd leveragesthe high-performanceand low-powerDSPcoreof the C5535and C5545devicestoprocessthe microphoneinputand respondto a followingsectionspresentthe theoryof operationof the EmbeddedSpeechRecognizerTIesris a HiddenMarkovModel(HMM)-basedautomaticspe echrecognizer(ASR)that is efficientfixed-pointimplementationof the grammar-basedrecognizerthatrequiresreduc edmemoryand algorithmcontainsexcessivebackgroundnois esuppressionand also containsconfidencemeasuringto allowfor voiceactivitydetectiondecisionsare basedon the following.
8 Energyin the signal Autocorrelation Matchingto silenceacousticmodelsFigure4 showsthe TIesrAPI TIesrAPI ArchitectureFeatures: Fixedpointrepresentation: Offers10-mfcc,10-delta,and 20-msframes Offersrepresentationin shortor byte Offersdynamicbyte scalingbasedon March2016 RevisedMay 2016 SubmitDocumentationFeedbackCopyright 2016,TexasInstrumentsIncorporatedSpeechR ecognitionReferenceDesignontheC5535eZdsp Voiceactivitydetection: Doesnot sendfeaturesto recognizerif datanot required Decidesbasedon the following: Energyin signal Autocorrelation Matchingto C5535and C5545real-timeTIesrdemofunctionsby usingTI-RTOSto lists the summaryof the demonstrationis splitinto threadsas listedin Table1,Table1. DemonstrationSoftwareArchitectureSummary ThreadnumberPriority(0 highest)NameFunction11 UserInput START,STOP functions Firedby timerISR SARpollingrate fixedbytimerintr20 AudioDataCollection Pingpongbuffer inputcircularbuffer Firedby DMAISR Ratefixedby DMA(I2 Ssync)intr Firesrecognizerthread(for example,SWI_inc())32 Recognizer Readaudioframefrominputcircularbuffer Run recognizeron inputaudioframe If recognitionresult,runJAC_update()and getrecognizerresults Firedby audiodatacollection43 OutputDisplay Outputresultsto LCD Firedby recognitionthread(for example,SWI_post()orSEM_post())
9 March2016 RevisedMay 2016 SubmitDocumentationFeedbackCopyright 2016,TexasInstrumentsIncorporatedSpeechR ecognitionReferenceDesignontheC5535eZdsp Whenthe demonstrationis executed,thereare severalstatesthat the systementersbasedon the followingis a summaryon the varioustasksthe Waitingfor userto inputcommandfrompush-button(SW2)network. If START commandis received,transitionto StartAudioDataCollectionstate. If STOP commandreceived,remainin Idle ADCoutputnot writtento activethread Recognizerstateis up-to-datewith respectto all be activethread Outputof previousrecognitionresultsto LCDmay be in Softwarecontrolsupdatedfor the following: ADCoutputis writtento inputcircularbuffer. Thread:Recognizeris notifiedwhena new audioframeis ADCoutputis not writtento activethead Recognizerstateis up-to-datewith respectto all be activethread Outputof previousrecognitionresultsto LCDmay be in March2016 RevisedMay 2016 SubmitDocumentationFeedbackCopyright 2016,TexasInstrumentsIncorporatedSpeechR ecognitionReferenceDesignontheC5535eZdsp RecognizingUserInputactivethread Waitingfor userto inputcommandfrompush-buttonnetwork.
10 If START commandis received,remainin Recognizingstate. If STOP commandis received,transitionto Idle ADCoutputis writtento Recognizeris consumingaudioframesfrominputcircularbuf fer. The numberof inputaudioframesreceivedbeforepreviousre cognitionprocessingis completelytransmittedto Recognizerthreadthroughglobalvariableor SWI mailbox(SWI_inc()) Recognizerthreadremainsin outermultipleutterancerecognitionloop until one of followingconditionsare met: A STOP commandis received. All audioframesare processed. Recognizerthreadremainsin innersingleutterancerecognitionloop (CallSearchEngine()andSpeechEnded())unti l one of followingconditionsare met: A STOP commandis received. All audioframesare processedand no recognitionresultis found. A recognitionresultis found. If the innerand outerloop terminatedbecausea STOP commandwas received:1.
