Home
Embedded SDK (Software Development Kit)
Contents
1. RWX ORIGIN 0x0000 LENGI RWX ORIGIN 0x002C LENGI RW ORIGIN 0x0000 LENGI RW ORIGIN 0x0030 LENGI RW ORIGIN 0x0040 LENGI R ORIGIN 0x0800 LENGI RW ORIGIN 0x1000 LENGI R ORIGIN 0x1600 LENGI RW ORIGIN 0x2000 LENGI RW ORIGIN 0xE000 LENGI RW ORIGIN OxF000 LENGI RW ORIGIN OxFF80 LENGI RW ORIGIN OxFFCO LENGI RW ORIGIN 0x4000 LENGI RW ORIGIN 0x4300 LENGI RW ORIGIN 0x4900 LENGI RW ORIGIN 0x4D00 LENGI RW ORIGIN Ox4E00 LENGI RW ORIGIN 0x5400 LENGI 0x002C OxFFD4 0x0030 0x0010 0x07CO 0x0800 0x0600 0x0A00 0xC000 0x1000 OxOF80 0x0040 0x0040 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 EK ke kk kk kk kk K k kk K kk kk k k kk kk k kk K K KOK k K KOK KOK K K K ke KA KOK KOK A kk ko k AA kkk A kk FORCE ACTIVE FconfigInterruptVector SECTIONS EA ke ke A A k kk kk eA K kk k A A k kA kA KOK K K A KOK KOK A IR A k I AK KOK IK i i i P Data X Memory Layout EX BIT 0 Internal Memory Partitions for mem h partitions N UM IM PARTITIONS 2 F N UM_EM_PARTITIONS 1 f xIntRAM DynamicMeml and xIntRAM DynamicMem2 External Memory Partition for mem h partitions xExtRAM DynamicMem jk
2. Figure 2 1 Core Directories As shown in Figure 2 1 DSP56824EVM has no operating system nos support and contains these core directories applications contains applications software that can be exercised on this platform bsp contains board support package specific for this platform config contains default hardware software configurations for this platform include contains SDK header files which define the Application Programming Interface Sys contains required system components tools contains utilities used by system components There are also optional directories that include domain specific libraries MOTOROLA Directory Structure 2 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 2 2 Optional Domain Specific Directories Directory Structure Figure 2 2 demonstrates how the VRLite 1 algorithm is encapsulated in the domain specific directories under the directory speech EC dsp56824evm nos E J config J include J security 3 signal 3 speech gt mm G sys 3 telephony tools Figure 2 2 DSP56824 Directories The speech directory includes speech recognition specific algorithms Figure 2 3 shows the vrlitel directory st
3. 3 20 For More Information On This Product VRLite 1 Library Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 7 vrlite1 Control Call s Specifications Result vrlitelControl vrlitel sHandle pVrlitel UWordl16 Command Required Header vrlite h Arguments Table 3 8 vrlite1Control Arguments pVrlite1 in Handle to an instance of VRLite 1 generated by a call to vrlite1 Create Command in Command for controlling VRLite 1 Description Reserved for future use Returns None Special Considerations None MOTOROLA VRLite 1 Library Interfaces 3 21 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VRLite 1 Library Interface F ee scale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 8 vrlite1Destroy Call s void vrlitelDestroy vrlitel sHandle pVrlitel Required Header vrlite h Arguments Table 3 9 vrlite1Destroy Arguments pVrlitel in Handle to an instance of VRLite 1 generated by a call to vrlite1 Create Description The vrlite Destroy function destroys the instance of VRLite 1 originally created by a call to vrlitel Create If the user bypassed the vrlitel Create function to create an instance on his own the vrlitel Destroy function should not be called Retu
4. kok k k kk kk kk K k kk kk kk k k kk kk Ck kk X K KOK k K KOK KOK K K K ke KA kkk KOK ke kkk k AA ko kk kc kc kk ApplicationInterruptVector vector c text gt plInterruptVector jk A k ee A A Ck A A A K A A A A k KA kA A A A ko I A IR A k I AK KK kK ApplicationCode 5 2 Place all code into External Program RAM text rtlib text VRLite 1 Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc VRLite 1 Library ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 fp engine text user text pExtRAM HKKK KK K kk ck kk k kk k k kk kk YK kk kk kk k kk kk k kk Ck k YK KOK k k kk kA K K KOK KOK ke kk A k k kc k AA k k ko kc ke ke ke ApplicationData Define variables for C initialization code F_Xdata_start_addr_in_ROM ADDR xIntROM SIZEOF xIntROM 2 F_StackAddr ADDR xStack F_StackEndAddr ADDR xStack SIZEOF xStack 2 1 F Xdata start addr in RAM Define variables for SDK mem library EXbit EH EX BIT memNumIMpartitions WRITEH NUM IM PARTITIONS FmemNumEMpartitions RITEH NUM EM PARTITIONS D B a pH nj bj H nj memIMpartitionList DR xIntRAM DynamicMeml H SIZEOF xIntRAM DynamicMeml 2 H ADDR xIntRAM Dynami
5. VR FE PASS Frontend processing for utterance 2 res VR_FE_BUSY while res VR_FE_BUSY Read FRAME_LEN samples at a time into inputTrn from file or codec res vrlitelFrontendProcess pVrlitel inputTrn FRAME LEN if res VR TIME OUT ERROR Time out Error Take appropriate action vrlitelDestroy pVrlitel return else if res VR BAD SIGNAL QUALITY ERROR Bad signal quality Take appropriate action vrlitelDestroy pVrlitel return If there is no error in frontend processing continue with training Training res vrlitelTrainingProcess pVrlitel if res VR TRAIN PASS if res VR TRAINING ERROR Error in core training Take appropriate action vrlitelDestroy pVrlitel return MOTOROLA VRLite 1 Library Interfaces 3 9 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VRLite 1 Library Interface F ee scale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 else Training over Take appropriate action NOTE If training fails there is no point in going ahead with rejection analysis Rejection Analysis for i 0 i lt pConfig gt GlobalStats 0 i Fill prevModelBuf buffer with ONE previous model res vrlite
6. xExt2Vrlitel VrlitelData3 Place all code into External Data RAM ALIGN 0x10 VR_Y_3 MEM SHARE data gt xExt3Vrlitel VrlitelData4 Place all code into External Data RAM ALIGN 0x10 VR Y 4 MEM SHARE data xExt4Vrlitel VrlitelData5 Place all code into External Data RAM ALIGN 0x20 VR LONG MEM SHARE data gt xExt5Vrlitel VrlitelData6 Place all code into External Data RAM VR X MEM SHARE bss VR Y 5 MEM SHARE bss xExt6Vrlitel 5 4 VRLite 1 Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 6 VRLite 1 Applications 6 1 Test and Demo Applications To verify the VRLite 1 algorithm test and demo applications have been developed Refer to the Targeting Motorola DSP568xx Platform Manual for the DSP you are using to see if the test and demo applications are available for your target MOTOROLA VRLite 1 Applications 6 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VRLite 1 Applications Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 6 2 VRLite 1 Library For More Information On This Produ
7. Ltd Silicon Harbour Centre 2 Dai King Street Tai Po Industrial Estate Tai Po N T Hong Kong 852 26668334 Technical Information Center 1 800 521 6274 HOME PAGE http www motorola com semiconductors MOTOROLA For More Information On This Product SDK129 D Go to www freescale com
8. 4 1 Figure 4 2 Figure 4 3 MOTOROLA Typical Speaker Dependent Speech Recognition Block Diagram Training Flow Diagriii 33 ore asuaka kasqaku haykus ES Rocosmi on Flow DIN S oe reo doo RE EOD K k k Core DOOR a cesset aerbe4kebbadrhdXs dA bd4 bn er b4d AP ERTLES AA EU DSP30S 2A DCs zsdssddn kedondd sad kaskad n k c ES ded ens vritel Directory ONS R u s O sart Po eR eC HOS Dependency Build Tor VRLate 1 Project Lu duas Ree Ab ore v ed ews as PIO Sel K RO E O EP TEENS LEESUERITEESP EE oh PO em m o o RO ERES List of Figures For More Information On This Product Go to www freescale com Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 vi Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VRLite 1 Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 List of Examples Code Example Code Example Code Example Code Example Code Example Code Example Code Example Code Example MOTOROLA 3 1 3 2 3 3 3 4 3 5 3 6 3 7 51 C Header Fus viliaL z disak k ekk n doklad dude ud Use of mem Library in vrlitelCreate function Lise Or ilie lb eate Meer Uu u eX LER REX Sn o EE ERES Sample Callback Procedure for Training Sample Callback P
9. Example 3 1 as a reference Code Example 3 1 C Header File vrlite1 h ifndef _ VRLITE1 H define VRLITEl H KKK KR KKK KKK KKK oko ok KC YK IK k K SK K YK K YK SK ko ko kk SK K K K K K K K K K OK KOK K KOK ko K ke koe KOR KOK K KOR KG OG K eG ke Foundational Include Files gt AK IK K IK K K TK oko IK K K K K K K K K YK K K KOK K KOK KOK KOK K KOK KOK KOK KOK o kok k KOK R KOR ek include port h MOTOROLA VRLite 1 Library Interfaces 3 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VRLite 1 Library Interface F ee Scale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 KKK 3k k 3k Yk kk K XK IK YK ko kk ko YK SK K K IK K YK K YK YK ko ke K K YK K K K kk ko ke K K KOK KOK KOK K KOK KOK OK kc kk kc K KOK ke e ke ke ke ke Flags ok X k K k k K K K k YK k K TK YK IK K K K K YK K K K K K K K KOK K K KOK KOK K KOK KOK kkk kkk kkk kkk eee e x f VrControlFlag Bits Please see user manual for details define VR ABORT 0x0001 Not used define VR TRAINING 0x0002 define VR RECOGNITION 0x0004 define VR REJECTION ANALYSIS 0x0008 define VR RECOGNITION LAST 0x0010 Not used define VR REJECTION ANALYSIS LAST 0x0020 Not used define VR OUT OF VOCAB 0x0040 Not used define VR HANDSFREE 0x0080 Flags which indicate
10. Processors to expedite your application development and reduce the time it takes to bring your own products to market Motorola s Voice Recognition Library is licensed for your use on Motorola processors Please refer to the standard Software License Agreement in Chapter 7 for license terms and conditions please consult with your Motorola representative for premium product licensing 1 1 Quick Start Motorola Embedded SDK is targeted to a large variety of hardware platforms To take full advantage of a particular hardware platform use Quick Start from the Targeting DSP568xx Platform documentation For example the Targeting DSP56824 Platform manual provides more specific information and examples about this hardware architecture If you are developing an application for the DSP56824EVM board or any other DSP56824 development system refer to the Targeting DSP56824 Platform manual for Quick Start or any other information specific to the DSP56824 1 2 Overview of VRLite 1 VRLite 1 is a memory optimized isolated word speaker dependent speech recognition system This means that the system must be trained to the voice of a particular user and that it can recognize only isolated words For example if the user trained the words call and Bob the algorithm can recognize both call and Bob but not the phrase call Bob 1 2 1 Background Many products such as a mobile phone require a voice recognition system to operate t
11. Read FRAME LEN samples at a time into inputRecog buffer either from file or codec res vrlitelFrontendProcess pVrlitel inputRecog FRAME LEN if res VR TIME OUT ERROR Take appropriate action Time out Error vrlitelDestroy pVrlitel return else if res VR BAD SIGNAL QUALITY ERROR Bad signal quality Take appropriate action vrlitelDestroy pVrlitel return MOTOROLA VRLite 1 Library Interfaces 3 19 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 For details on structures used in Code Example 3 6 see Code Example 3 1 Recognition VRLite 1 Library Interface F ee Scale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 for i 0 i lt pConfig gt GlobalStats 0 i Get ONE previously trained model which is always of size 91 into prevModelBuf buffer res vrlitelRecognitionProcess if res VR CONF break if res VR CONFIG Configuration error take appropriate action IG_ERROR ERROR else if res VR_RECOG_BUSY pVrlitel prevModelBuf Error All prev models are not supplied Take appropraite action else Recognition complete Take appropraite action Destroy the VR LITI vrlitelDestroy pVrli return El instance tel
12. VRLite is real time After front end processing the host appropriately 1 The APIs provided in Chapter 3 are not for the Handset user but for the user who writes the host software The test files provided in the library somewhat serve as controller 1 2 VRLite 1 Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc view of VRLite 1 ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 invokes the back end for either training or recognition The flow involved in training is shown in Figure 1 2 the flow involved in recognition is shown in Figure 1 3 Note that training requires two utterances of a word to be trained while recognition requires only one utterance Core Algorithm The core algorithm consists of frontend and backend of VRLite 1 The frontend is filter bank based and extracts the features from the speech frames The backend consists of HMM based training and recognition algorithms Prompt user for word to g train Y User says word Utterance OK Display error message Prompt user for word to g train Y User says word No Utterance OK Display error message Train word No Display error message Yes Display training success message Figure 1 2 Training Flo
13. from FE define VR CONFIG ERROR 4 Configuration error define VR TRAINING ERROR 5 Error in core training fdefine VR REJECT MODEL 6 Reject the current model RK KKK IK k kk ok ok ko Kk XK SK YK K IK K YK K K K K YK K K kc K K K KOK K K K KOK KOK K ko ko KOK ke oo KOK KOK K ke ke ke e ke e e ke Structures for VRLite 1 K K oko E kk kc IK K ke ok ke XK K K K SK K ko K K K K K K K kc KOK ko kc ko k k kk k kk kk kkk kkk kk KOK KO KOK kkk e x f 3 2 VRLite 1 Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc Interface ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 User configurable structure Call back structure typedef struct void pCallback void pCallbackArg void pResult UWord16 NumResult void pCallbackArg vrlitel sCallback This structure must be used by the user to configure VRLite 1 typedef struct UInt16 VrControlFlag Control flags the bits are explained above Word16 GlobalStats 4 Global statistics buffer contains 4 words namely numModels numReps MSW of NoiseMean and LSW of Noise Mean vrlitel sCallback Callback Callback structure vrlitel sConfigure VR LITE1 handle structure This structure is used internally by VR LITE1 for its operation The user should not set up this structur
14. grants no other rights Title to the Software all copies thereof and all rights therein including all rights in any intellectual property including patents copyrights and trade secrets applicable thereto shall remain vested in Motorola For the Source Motorola grants Licensee a personal non exclusive non assignable revocable royalty free right to use copy and make derivatives of the Source solely in a development system environment in order to produce object code solely for operating on a Motorola semiconductor device having a central processing unit Derivative Object For the Object and Derivative Object Motorola grants Licensee a personal non exclusive non assignable revocable royalty free right to copy use and distribute the Object and the Derivative Object solely for operating on a Motorola semiconductor device having a central processing unit Licensee agrees to a not use modify or copy the Software except as expressly provided herein b not distribute disclose transfer sell assign rent lease or otherwise make available the Software any derivatives thereof or this license to a third party except as expressly provided herein c not remove obliterate or otherwise defeat any copyright trademark patent or proprietary notices related to the Software d not in any form export re export resell ship or divert or cause to be exported re exported MOTOROLA License 7 1 For More Information On This Product
15. how to use the vrlitel Init function 1 In this case user refers to the host function and not to the end user 3 14 VRLite 1 Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 3 vrlite1FrontendProcess Call s Specifications Result vrlitelFrontendProcess vrlitel sHandle pVrlitel Wordl6 pSamples UWord16 NumSamples Required Header vrlite1 h Arguments Table 3 4 vrlite1FrontendProcess Arguments pVrlite1 in Handle to an instance of VRLite 1 pSamples in Pointer to speech samples samples of the uttered word NumSamples in The number of samples to be processed Description The vrlite FrontendProcess function processes samples to generate feature vectors for the utterance These feature vectors will be used in training recognition The user must call the vrlitel FrontendProcess function in a loop as long as the VR FE BUSY flag is returned from vrlitel FrontendProcess function Returns The following are the return values VR TIME OUT ERROR indicates time out when valid speech cannot be found in the utterance for approximately the first 2 seconds VR BAD SIGNAL QUALITY ERROR indicates that the signal quality of the utterance is bad VR FE PASS indicates that the front end processing is complete VR FE BUSY indi
16. the return status define VR FE BUSY 0x0001 Frontend busy flag define VR RA BUSY 0x0002 RA busy flag define VR RECOG BUSY 0x0004 Recog busy flag Training returns 91 HMM values for every word trained along with 4 global noise mean values These values MUST be stored by the user in his callback function define HMM SIZE 91 Size of packed HMM buffer define GLBL STAT SIZE 4 Size of global noise mean buffer After the recognition is complete two values are returned through callback These values are the indices of the first best match and the second best match from the list of previously trained words Lu N Size of best word table define BW SIZI KKK KKK Ik k kk CK YK A K YK YK IK Ik K IK K YK k K YK YK ko K K kc K kc K ko kc K K K YK K K KOK KOK K KOK KOK OK KOK KOK K ke ke KOK ke ke e ke PASS Error messages KKK K ko K K ko K SK K K SK K K K K K K K K K KOK KOK KOK KOK K KOK OK ok KOK KOK K kkk KOK KOR KOK KO KOR KOK KO f define VR FF_PASS 0 Frontend PASS define VR TRAIN PASS 1 Training PASS define VR RA PASS 2 RA PASS define VR RECOG PASS 3 Recognition PASS define VR ACCEPT MODEL 4 Accept the current model define VR TIME OUT ERROR 2 Time out error from FE define VR BAD SIGNAL QUALITY ERROR 3 Sig Q error
17. CONDUCTOR INC 2005 LSB Least Significant Bit MIPS Million Instructions Per Second MSB Most Significant Bit OnCE On Chip Emulation OMR Operating Mode Register OOV Out Of Vocabulary RA Rejection Analysis SDK Software Development Kit SDSR Speaker Dependent Speech Recognition SRC Source VRLite 1 Voice Recognition 1 References The following sources were referenced to produce this book 1 DSP56800 Family Manual DSP56800FM AD 2 DSP56824 User s Manual DSP56824UM AD 3 Embedded SDK Programmer s Guide SDK101 D MOTOROLA Preface For More Information On This Product Go to www freescale com Xi Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Xii Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VRLite 1 Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 1 Introduction Welcome to Motorola s Family of Digital Signal Processors DSPs This document describes the Voice Recognition VRLite 1 Library which is a part of Motorola s comprehensive Software Development Kit SDK for its DSPs In this document you will find all the information required to use and maintain the VRLite 1 Library interface and algorithms Motorola provides these algorithms to you for use on the Motorola Digital Signal
18. Freescale Semiconductor Inc MOTOROLA Embedded SDK Software Development Kit Voice Recognition VRLite 1 Library SDK129 D Rev 2 07 23 2002 ef k MOTOROLA In Motorola Inc 2002 All rights reserved intelligence everywhere digi taldna For More Information On This Product o to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Contents About This Document O ess d LR E k EIN RE RD E E a HOO eh P EPA bERE Scbol eV Suggested Reading 24324 t4 bb ERA RARXAA deca seeds ARTE ARRA A A Rd C Ol VO Wi eem oe do os v d r CERES nt Kan ES Ee e Definitions Acronyms and Abbreviations se MR O P dads dd do marbre nist Chapter 1 Introduction 1 1 ZACK SLE PTTT OO dd E ens 1 2 Overview or VRE 3 kod dk P nk k k EA GRO R RR CX GO XGA hk 1 2 1 DEO odora PRESPUVPRRREATANTTVEUVA E VE b da ceeds sck 122 Features and Performance Chapter 2 Directory Structure 2 1 Required Core Directories qaaseskquess43ERtrczq rA ARA k ESSERE TE 2 2 Optional Domain Specific Directories Chapter 3 VRLit
19. Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 resold shipped or diverted directly or indirectly the Software or a direct product thereof to any country which the United States government or any agency thereof at the time of export or re export requires an export license or other government approval without first obtaining such license or approval License THE SOFTWARE IS PROVIDED ON AN AS IS BASIS AND WITHOUT WARRANTY OF ANY KIND INCLUDING WITHOUT LIMITATION ANY WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY LIABILITY OR DAMAGES OF ANY KIND INCLUDING WITHOUT LIMITATION DIRECT OR INDIRECT OR INCIDENTAL OR CONSEQUENTIAL OR PUNITIVE DAMAGES OR LOST PROFITS OR LOSS OF USE ARISING FROM USE OF THE SOFTWARE OR THE PRODUCT REGARDLESS OF THE FORM OF ACTION OR THEORY OF LIABILITY INCLUDING WITHOUT LIMITATION ACTION IN CONTRACT NEGLIGENCE OR PRODUCT LIABILITY EVEN IF MOTOROLA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE THIS DISCLAIMER OF WARRANTY EXTENDS TO LICENSEE OR USERS OF PRODUCTS AND IS IN LIEU OF ALL WARRANTIES WHETHER EXPRESS IMPLIED OR STATUTORY INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR PARTICULAR PURPOSE Motorola does not represent or warrant that the Software is free of infringement of any third party patents copyrights trade se
20. R INC 2005 Building the VRLite 1 Lip amp e Scale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 External RAM ia v Br B Files Link Order Targets Fie Code Daa E13 Dependencies amp 9K 13K m HC SDK Configuration 123 34 m HE3 SDK Projects 0 D z o bsp mep n a na m Hh sys mcp n a nia m l tools mcp n a na m i n a n a a HC SDK Libs 29K K m HC MSL 39K K m F C Sources 1K 2K m Figure 4 1 Dependency Build for VRLite 1 Project 4 1 2 Direct Build Direct build allows you to build the VRLite 1 library independently of any other build Follow these steps Step 1 Open vrlitel mcp project as shown in Figure 4 2 m vrlitel mcp i OF XI Library ig vy M gt Al Files Link Order Targets Fie Code Data HC ASM Sources 12K BK FS F API Sources 944 m 45 files 12K 8K zl Z Figure 4 2 vrlite1 mcp Project Step 2 Execute the build by pressing function key F7 or by choosing the Make command from the Project menu see Figure 4 3 4 2 VRLite 1 Library MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Using the VRLite 1 Library ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Metrowerks CodeWarrior Project Biles HC ASM Sources Mt FH API Sources Str HY BUT EST EHI S zi stop Build BI EBTESN Figure 4 3 Execut
21. R RA PASS indicates that Rejection Analysis passed and the next model is to be supplied for analysis VR ACCEPT MODEL indicates that the rejection analysis is complete and the current model must be accepted Special Considerations One previous model is to be passed at a time This implies that this API must be called previous model number of times from the calling module Code Example See Code Example 3 3 to learn how to use the vrlite RejAnalysisProcess function MOTOROLA VRLite 1 Library Interfaces 3 17 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VRLite 1 Library Interfaces eescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 6 vrlite1 RecognitionProcess Call s Result vrlitelRecognitionProcess vrlitel sHandle pVrlitel Wordl6 pPrevModels Required Header vrlite1 h Arguments Table 3 7 vrlite1RecognitionProcess Arguments pvrlite 1 in Handle to an instance of VRLite 1 pPrevModels in Pointer to previously trained models Description The vrlite I RecognitionProcess function recognizes the word uttered with respect to the vocabulary i e previously trained models Unlike training recognition requires only one utterance for its operation After configuring for recognition the user must call the vrlite RecognitionProcess function for each previously trained model see Code Example 3 6 Returns Upon
22. RCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VRLite 1 Library Interface eescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Code Example 3 5 Sample Callback Procedure for Recognition void CallbackRecog void pCallbackArg void pResult UWordl6 NumResult Intl6 i Wordl6 pTemp Wordl6 pCallbackArg Wordl6 pTempIn Wordl6 pResult for i 0 i lt NumResult i premp i pTempIn i return Code Example 3 5 is the callback function to be written by the user which collects the output given by the vrlite I RecognitionProcess function Recognition thread of the VRLite 1 library Recognition returns two values first best word and second best word indices through callback which should be collected by the user This example illustrates just one of the simple ways of collecting these outputs In an embedded system environment these outputs can be used to take appropriate further action During the callback the CallbackRecog function stores the two values in the BestWordOut buffer pointed to by pCallbackArg Returns Upon successful completion VRliteInit returns PASS VRlitelnit returns VR CONFIG ERROR to indicate an error in the configuration of pconfig structure Special Considerations If vrlitel Create is called then the user need not call vrlite Init function as it is called internally in the vrlite Create function Code Example See Code Example 3 3 to learn
23. RLite 1 Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 List of Tables Table 3 1 Table 3 2 Table 3 3 Table 3 4 Table 3 5 Table 3 6 Table 3 7 Table 3 8 Table 3 9 MOTOROLA vrlielC rae APUG 64 u Ra Eres b d vad dud ud vrie U ODO ua udo ERE HR hh RERE RR SRM E de PP Description of the fields or VrControlFlag velite ProntendProcess Arguments vrlitei Traintne Process Arguments linectatceksectriseESARRRCE HERES vrltelReJAnalysisProcess Arguments vrlite lRecognitionProcess Arguments yrlite Control Arguments s o aso359pRF ERE Tris rka kesre t viite lDestroy MM 2 erar RC PLE db ERE NC E R AE List of Tables For More Information On This Product Go to www freescale com Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VRLite 1 Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 List of Figures Figure 1 1 Figure 1 2 Figure 1 3 Figure 2 1 Figure 2 2 Figure 2 3 Figure
24. RLite is configured for recognition VR_REJECTION_ANALYSIS set Indicates that VRLite is configured for Training as well as Rejection Analysis this bit cannot be set without setting the VR TRAINING bit VR RECOGNITION LAST Not Applicable VR REJECTION ANALYSIS LAST Not Applicable VR OUT OF VOCAB Not Applicable The feature of OOV rejection is permanently enabled in the library VR HANDSFREE set Indicates that training or recognition is done in handsfree mode GlobalStats Global statistics buffer of size 4 Each location in the buffer is explained below GlobalStats 0 2 Number of previously trained models GlobalStats 1 2 Number of utterances for which noise update is done GlobalStats 2 2 Most Significant Word of Noise Mean GlobalStats 3 2 Least Significant Word of Noise Mean This buffer must be filled by the host and given to API These values must be zeros before training any model The VRLite algorithm then updates these values during the training of every new model and returns them to the host through the callback function The host stores the values given by the VRLite algorithm and ensures that these values are not altered outside the VRLite algorithm Callback A structure of type vrlitel sCallback it describes the procedure which VRLite 1 will call once the training or recognition is complete The training calls back twice outputting 91 HMM values and 4 global noise me
25. RROR Special Considerations None Code Example See Code Example 3 3 to learn how to use the vrlite TrainingProcess function 3 16 VRLite 1 Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 5 vrlite1 RejAnalysisProcess Call s Specifications Result vrlitelRejAnalysisProcess vrlitel sHandle pVrlitel Wordl6 pPrevModels Required Header vrlite1 h Arguments Table 3 6 vrlite1RejAnalysisProcess Arguments pvrlite 1 in Handle to an instance of VRLite 1 pPrevModels in Pointer to previously trained models Description The vrlite I RejAnalysisProcess function decides whether the HMM model and global noise mean values given by the vrlite TrainingProcess function should be retained or rejected Rejection Analysis requires the previously trained models to do the analysis The user must call the vrlite I RejAnalysisProcess function after Training and it must be called for each previously trained model Returns The following are the return values VR CONFIG ERROR indicates an error in the configuration of the pConfig structure because Rejection Analysis cannot work without training VR REJECT MODEL indicates that the model is rejected i e a similar model might already exist in the vocabulary the set of previously trained models V
26. This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VRLite 1 Library Interface F eescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Note The structure of type WriteOutputTrn below is given here for illustration purposes only The structure is to be decided by the user who must write this kind of test file depending on the callback function This example assumes that the callback function just copies the output given by the VRLite 1 library to the hmmParam buffer in the structure below typedef struct Word16 hmmParam HMM SIZE GLBL STAT SIZE UWordl6 offset WriteOutputTrn used in callback for collecting the output void testVrlitelTraining vrlitel sHandle pVrlitel vrlitel sConfigure pConfig Intl16 i Result res WriteOutputTrn hmmParamOut hmmParamOut offset 0 Set up the configuration pConfig vrlitel sConfigure memMallocEM sizeof vrlitel sConfigure if pConfig NULL assert Out of memory When there are no words trained all the values of GlobalStats will be zeros These values are updated by the VRLite 1 algorithm and returned to the calling function through callback It is up to the calling module which calls Training API to store these returned values The user calling module can define a buffer of length 4 words and keep overwriting with the latest returned values Durin
27. an values The recognition does callback to output 2 best word values The callback procedure has the following declaration void pCallback 3 12 VRLite 1 Library void pCallbackArg void pResult UWord16 NumResult MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 The callback procedure parameter pCallbackArg is supplied by the user in the vrlitel sCallback structure this value is passed back to the user during the call to the callback procedure Typically pCallbackArg points to context information used by the callback procedure which the user must write Specifications An example callback procedure for training is shown in Code Example 3 4 for reference You must write your own callback procedure This callback procedure stores the result in a buffer specified by the user or the host through a pCallbackArg pointer Code Example 3 4 Sample Callback Procedure for Training void CallbackTrain void pCallbackArg void pResult UWordl6 NumResult Intl6 i WriteOutputTrn pTemp WriteOutputTrn pCallbackArg Wordl6 pTempIn Wordl6 pResult for i 0 i lt NumResult i pTemp gt hmmParam pTemp gt offset i prempIn i pTemp gt offset NumResult return Code Example 3 4 is the callback function to be wri
28. as Licensee uses the Software for its intended purpose and is not in default of any provisions of this Agreement Motorola may terminate this Agreement if Licensee is in default of any of the terms and conditions of this Agreement This Agreement shall be governed by and construed in accordance with the laws of the State of Arizona and can only be modified in a writing signed by both parties Licensee agrees to jurisdiction and venue in the State of Arizona By using modifying installing compiling or copying the Software Licensee acknowledges that this Agreement has been read and understood and agrees to be bound by its terms and conditions Licensee agrees that this Agreement is the complete and exclusive statement of the agreement between Licensee and Motorola and supersedes any earlier proposal or prior arrangement whether oral or written and any other communications relative to the subject matter of this Agreement 7 2 VRLite 1 Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Index B Background 1 1 D Dependency Build 4 1 Direct Build 4 2 DSP x DSP56800 Family Manual xi DSP56824 User s Manual xi E Embedded SDK Programmer s Guide xi F FEx Features and Performance 1 4 H HMM x I O x L linker cmd File 5 2 LSB x MIPS xi MSB xi N Notational Convent
29. cMem2 H SIZEOF xIntRAM DynamicMem2 2 MpartitionList H ADDR xExtRAM DynamicMem H SIZEOF xExtRAM DynamicMem 2 bj H Fi t Ej I RITI t FJ m mb m m o B Hi E p RITI RI Place all data into External RAM data fp state data rtlib data F Xdata ROMtoRAM length 0 F bss start addr BSS ADDR rtlib bss lo bss F bss length BSS ADDR Copy DATA gt xExtRAM HKK KK K K k ck kk k kk k k kk kk kk k kk k kk kk k kk k YK KOK K k k kk kA K KOK KOK KOK KOK KOK KOK k AKA k k k kk FArchIO ADDR xPeripherals2 HEKK kk kk ck kk k k kk k K kk kk kk kk kk k koc kk k k kk kk YK KOK k k kk kA k kk K KOK KOK KOK KOK KOK k kA A k kc kc kk MOTOROLA Linking Applications with the VRLite 1 Library 5 3 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Linking Applications with Fregscale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VrlitelDatal Place all code into External Data RAM ALIGN 0x10 FRONTEND _ROM data VR COMMON ROM data VR RECO ROM data ALIGN 0x10 VR Y 1 MEM SHARE data gt xExtlVrlitel VrlitelData2 Place all code into External Data RAM ALIGN 0x100 VR_Y_2_MEM_SHARE data gt
30. cates that the front end processing is not finished and more samples are required to complete the front end processing Special Considerations For Training this API must be invoked for two utterances for Recognition this API can be invoked for only one utterance To maximize the performance of recognition in noisy environments the environment must be as quiet as possible for training Code Example See Code Example 3 3 to learn how to use the vrlitel FrontendProcess function MOTOROLA VRLite 1 Library Interfaces 3 15 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VRLite 1 Library Interface F ee scale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 4 vrlite1TrainingProcess Call s Result vrlitelTrainingProcess vrlitel sHandle pVrlitel Required Header vrlitel h Arguments Table 3 5 vrlite1 TrainingProcess Arguments pVrlite1 in Handle to an instance of VRLite 1 Description The vrlite TrainingProcess function will generate the HMM model representation for the uttered word Training requires two utterances of the same word to generate the HMM model The user must call the vrlite I TrainingProcess function after front end processing Returns Upon successful completion vrliteTrainingProcess will return VR TRAIN PASS if there is a failure in the core training module vrliteTrainingProcess returns VR TRAINING E
31. clude vrlitel h include mem h vrlitel_sHandle vrlitelCreate vrlitel_sConfigure pConfig vrlitel_sHandle pVrlitel Memory allocation for Handle pVrlitel vrlitel_sHandle memMallocEM sizeof vrlitel sHandle if pVrlitel NULL return NULL Force the pointers of members to NULL pVrlitel gt pContextBuf NULL pVrlitel gt Callback NULL Allocate memory for context buffer pVrlitel gt pContextBuf Word16 memMallocEM FRM SIZE sizeof Word16 if pVrlitel gt pContextBuf NULL vrlitelDestroy pVrlitel return NULL 3 6 VRLite 1 Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Allocate memory for callback structure pointer pVrlitel gt Callback vrlitel sCallback memMallocEM sizeof vrlitel sCallback Specifications if pVrlitel Callback NULL vrlitelDestroy pVrlitel return NULL vrlitellnit pVrlitel pConfig return pVrlitel For details on the vrlite sHandle structure and constants used in Code Example 3 2 please refer to Code Example 3 1 If the vrlitel Create function is called to create an instance then vrlite I Destroy see Section 3 3 8 should be used to destroy the instance Alternatively the user can allocate memory statica
32. crets or other intellectual property rights or that Motorola has the right to grant the licenses contained herein Motorola does not represent or warrant that the Software is free of defect or that it meets any particular requirements or need of the Licensee or that it conforms to any documentation or that it meets any standards Motorola shall not be responsible to maintain the Software provide upgrades to the Software or provide any field service of the Software Motorola reserves the right to make changes to the Software without further notice to Licensee The Software is not designed intended or authorized for use as components in systems intended for surgical implant into the body or other applications intended to support or sustain life or for any other application in which the failure of the Software could create a situation where personal injury or death may occur Should Licensee purchase or use the Software for any such unintended or unauthorized application Licensee shall indemnify and hold Motorola and its officers employees subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim of personal injury or death associated with such unintended or unauthorized use even if such claim alleges that Motorola was negligent regarding the design or manufacture of the Software The term of this Agreement is for as long
33. ct Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 7 License 7 1 Limited Use License Agreement LIMITED USE LICENSE AGREEMENT PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THIS SOFTWARE BY USING OR COPYING THE SOFTWARE YOU AGREE TO THE TERMS OF THIS AGREEMENT The software in either source code form Source or object code form Object cumulatively hereinafter Software is provided under a license agreement Agreement as described herein Any use of the Software including copying modifying or installing the Software so that it is usable by or accessible by a central processing unit constitutes acceptance of the terms of the Agreement by the person or persons making such use or if employed the employer thereof Licensee and if employed the person s making such use hereby warrants that they have the authority of their employer to enter this license agreement If Licensee does not agree with and accept the terms of this Agreement Licensee must return or destroy any media containing the Software or materials related thereto and destroy all copies of the Software The Software is licensed to Licensee by Motorola Incorporated Motorola for use under the terms of this Agreement Motorola retains ownership of the Software Motorola grants only the rights specifically granted in this Agreement and
34. e typedef struct UInt16 VrControlFlag Control flags the bits are explained above UInt16 VrInitFlag Flag indicating the status of inits see possibilities above UInt16 UtteranceNo Utterance number first or second Wordl6 pGlobalStats Pointer to Global statistics contains 4 words namely numModels numReps MSW of NoiseMean and LSW of Noise Mean Wordl6 pContextBuf Context Buffer of length 80 UWord16 ContextLen Length of context 80 UInt16 NumPrevModels No of previous models UIntl6 TempVar Temporary variable used as scratch vrlitel sCallback Callback vrlitel sHandle MOTOROLA VRLite 1 Library Interfaces 3 3 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VRLite 1 Library Interfacef ee scale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Pk kok k KR k Yk kc IK k K IK IK ke K K A K K SK K YK K K YK K ke ko K K k K K kk ko ke K KOK K KOK ko ko K KOK KOK OK KOK KOK K KOK e ke e e ke Commands for VRLi Ckckckckckckckckckckckckck lt x kc define STOP VRLITI El te 1 Control Fe KKK K k K K K K K KOK KOK K KOK K KOK KOK KOK K KOK kok ke KOK KO KOK ke eee 1 Not used as of now KKK k k kk Ik k XK IK IK IK YK K ke YK SK K K IK K YK K K K K K K K YK K K K KOK KOK K KOK K KOK KOK K KOK koe ke KOK KOK K KOK KOK ke ke ke ke Function Prototypes ok KARA ke K
35. e 1 Library Interfaces 3 1 WRIite 1 Services ik cain ea bead ox Roe Ged RO RE OREN CIA RR k od dk bh 3 2 A415 usd iude O ES O bh O O eee O i k OR sad dd de e PCIE atd gea Or CCS HR Are EO odis 3 3 1 Vra TE o y e POLACCO EORR EE Er ed oko ed op Ee e op 3 3 2 SNU PR R O O O O Read R O DAS vEuelProntsidPFOOESS uu caked bd ke ea k a A o ROC RES uos 3 3 4 HB CATO cache Va PEAK ca Jak ap 8654 ees 3 3 3 VrtilelRejj AnalysISProgeSS eseoisrsecriohrescpaeiweesRe b ied Rd eis 3 3 6 Velie Recognition Process iudi aaa bRA4 AER RRERA RE AFER EERSEERE EA AO Vett DUI zz ada 13 9 i eb dak sb r eet dg dob 3 3 8 CER o uu apos p MOTOROLA Table of Contents For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 4 Building the VRLite 1 Library 4 1 Building the VRLIS LIBCB ies vsosdkesessKai svede ERE RS EPI 4 1 Dopod ue DSM a doe deae o o o dri B eoa 6 Hom ias 4 1 2 Doc Build svahu Axe RERTARETEREA E ERr E REA RA TR Ed Chapter 5 Linking Applications with the VRLite 1 Library 5 1 EEN LIUM zi esa qdons ext ne eee Pace deed cri ep ANI Libra DR AS o Sh po do a RRECAM CIR SE PE EE EAT Chapter 6 VRLite 1 Applications 6 1 Test and Demo Applicalona dacesaasubatekesee tebierbserd iaa Chapter 7 License 7 1 Limited Use License Agreement cewek ce se avene ERR RR E EX qawaq ii V
36. e Make At this point if the build is successful the vrlitel lib library file is created in the nos speech vrlite1 Debug directory Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 MOTOROLA Building the VRLite 1 Library 4 3 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Building the VRLite 1 Lipf amp e Scale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 4 4 VRLite 1 Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 5 Linking Applications with the VRLite 1 Library 5 1 VRLite 1 Library The library includes APIs which define the interface between the user application and the VRLite 1 modules As the VRLite 1 APIs are not a direct interface to the end user for example a handset user the user application must be like host software To invoke VRLite 1 APIs must be called in this order vrlitel Create y vrlitelInit y virlitelFrontendProcess y vilitelTrainingProcess y vilitel RejAnalysisProcess y vrlitelRecognitionProcess y vilitelDestroy y 5 1 1 Library Sections The VRLite 1 Library contains the f
37. g configuration for VRLite 1 through pConfig structure these stored values must be assigned as shown below The values below are not zeros because there are some previously trained models stored in the file prev models in located at nos speech vrlitel test io X X X X X X X pConfig VrControlFlag VR TRAINING VR REJECTION ANALYSIS pConfig GlobalStats 0x007e pConfig gt GlobalStats 1 0x000e pConfig gt GlobalStats 2 0x0000 pConfig gt GlobalStats 3 0x00e0 pConfig Callback pCallback CallbackTrain pConfig Callback pCallbackArg WriteOutputTrn amp hmmParamOut Vrlitel instance creation and initialization pVrlitel vrlitelCreate pConfig if pVrlitel NULL assert Out of Memory Frontend processing for utterance 1 res VR FE BUSY while res VR FE BUSY I H Read FRAI EN samples at a time into inputTrn from file or codec 3 8 VRLite 1 Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 res vrlitelFrontendProcess pVrlitel inputTrn FRAME LEN Specifications Only if processing of first utterance is proper process the second utterance if res
38. he phone through voice VRLite 1 provides a solution for this requirement MOTOROLA Introduction 1 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Figure 1 1 shows the entire system in the context of a product and emphasizes the scope of the VRLite 1 software algorithm Introduction Microphone BPF ADC I 0 25 3 8kHz PT 8kHz l I l I l I l I l I l I VRLite 1 l I Algorithm I I Front end Host Software DISPLAY lt Product specific m T Back end l I l I l I l I l I l I l I l I l I I DAC ju 8kHz l I l I l I I I Handset Controller Core Algorithm Figure 1 1 Typical Speaker Dependent Speech Recognition Block Diagram Handset The input is a signal through a microphone containing speech and will output a symbol that represents the recognized utterance or perform some task associated with the recognized speech The display might be used to prompt the user for different inputs or to flag out messages to the user Controller This part consists of host processor A D and D A converters The input speech is filtered and digitized The host software supplies one frame at a time to the front end of the VRLite algorithm Note that front end processing in
39. ions x O OMR xi OnCE xi OOV xi Overview of VRLITE 1 1 1 R RA xi MOTOROLA SDK xi SDSR xi SRC xi V VRLite 1 xi vrlitel Directory Structure 2 2 vrlitel h 3 1 vrlitel Create 3 6 vrlitel Destroy 3 22 vrlitel FrontendProcess 3 15 vrlitelInit 3 10 vrlitel RecognitionProcess 3 18 vrlitel RejAnalysisProcess 3 17 vrlitel TrainingProcess 3 16 Index For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Motorola reserves the right to make changes without further notice to any products herein Motorola makes no warranty representation or guarantee regarding the suitability of its products for any particular purpose nor does Motorola assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all liability including without limitation consequential or incidental damages Typical parameters which may be provided in Motorola data sheets and or specifications can and do vary in different applications and actual performance may vary over time All operating parameters including Typicals must be validated for each customer application by customer s technical experts Motorola does not convey any license under its patent rights nor the rights of others Motorola products are not designed intended or authorized for use as compone
40. ite 1 Library describes organization of the VRLite 1 Library Chapter 6 VRLite 1 Applications describes the use of VRLite 1 Library through test demo applications Chapter 7 License provides the license required to use this product Suggested Reading We recommend that you have a copy of the following references e DSP56800 Family Manual DSP56800FM AD e DSP56824 User s Manual DSP56824UM AD Inside CodeWarrior Core Tools Metrowerks Corp MOTOROLA Preface ix For More Information On This Product Go to www freescale com Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Conventions This document uses the following notational conventions Typeface Symbol or Term Meaning Examples Courier Monospaced Type Commands command parameters code examples expressions data types and directives Foundational include files a data structure of type vrlitel sConfigure Italic Calls functions statements the pConfig argument e o d defined in the C header file vrlite1 h arguments file names an applications makes a call to the Callback procedure Bold Reference sources paths efer to the Targeting DSP56824 Platform emphasis manual see C Program FilesMotorola Embedded SDK help tutorials Bold Italic Directory name project name and contains these core directories applications contains a
41. kk XK SK K K YK K K K K K K K K K KOK KOK KOK KOK K KOK K k k KOK KOK K kkk KOK KOK KOK KOK KOR ek S EXPORT vrlitel sHandle vrlitelCreate vrlitel_sConfigure pConfig EXPORT Result vrlitelInit vrlitel sHandle pVrlitel vrlitel sConfigure pConfig EXPORT Result vrlitelFrontendProcess vrlitel sHandle pVrlitel Wordl6 pSamples UWord16 NumSamples EXPORT Result vrlitelTrainingProcess vrlitel sHandle pVrlitel EXPORT Result vrlitelRejAnalysisProcess vrlitel sHandle pVrlitel Wordl6 pPrevModels EXPORT Result vrlitelRecognitionProcess vrlitel sHandle pVrlitel Wordl6 pPrevModels EXPORT Result vrlitelControl vrlitel sHandle pVrlitel UWord16 Command EXPORT void vrlitelDestroy vrlitel sHandle pVrlitel fendif 3 4 VRLite 1 Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 Specifications Specifications The following pages describe the VRLite 1 library functions Function arguments for each routine are described as in out or inout An in argument means that the parameter value is an input only to the function An out argument means that the parameter value is an output only from the function An inout argument means that a parameter value is an input to the functio
42. lRejAnalysisProcess pVrlitel prevModelBuf if res VR_RA_PASS break if res VR_CONFIG_ERROR Configuration error Take appropriate action else if res VR_REJECT_MODEL Reject the current model i e do not add the current model to the list of previous models else if res VR ACCEPT MODEL If VR_ACCEPT_MODEL the HMM sent by training module can be accepted i e add the current model to the list of previous models and increment the number of models i e the first value in the global statistics must reflect this increment in the number of models For details on structures used in Code Example 3 3 see Code Example 3 1 3 10 VRLite 1 Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 2 Vrlite1lnit Call s Specifications Result vrlitelInit vrlitel sHandle pVrlitel vrlitel sConfigure pConfig Required Header vrlite1 h Arguments Table 3 2 vrlite1Init Arguments pVrlite1 in Handle to an instance of VRLite 1 pConfig in A pointer to a data structure containing data for initializing the VRLite 1 algorithm Description The vrlite Init function will initialize the VRLite 1 algorithm During the initializati
43. lly which requires duplicating all statements in the vrlite 1 Create function In this case the user can call the vrlite Init function directly bypassing the vrlitel Create function If the user dynamically allocates memory without calling the vrlite 1 Create function then the user himself must destroy the memory allocated Returns Upon successful completion the vrlite Create function will return a pointer to the specific instance of VRLite 1created If vrlite Create is unsuccessful for any reason it will return NULL Special Considerations e The VRLite 1 library is not re entrant If vrlitel Create is called then the user need not call vrlite Init function as it is called internally in the vrlite I Create function In Code Example 3 3 the application creates an instance of VRLite 1 Code Example 3 3 Use of vrlite1Create Interface include vrlitel h include mem h define FRAME LEN 80 NOTE Frame length is defined to be 80 samples for illustration purposes only This value could be user s choice Function prototype void testVrlitelTraining The function below is an example for testing training with rejection analysis Input and output buffers Wordl6 inputTrn FRAME LEN Input buffer containing FRAME LEN samples Word16 prevModelBuf HMM SIZE Each HMM model is always of size 91 MOTOROLA VRLite 1 Library Interfaces 3 7 For More Information On
44. n but the same parameter is also an output from the function Typically inout parameters are input pointer variables in which the caller passes the address of a preallocated data structure to a function The function stores its results within that data structure The actual value of the inout pointer parameter is not changed MOTOROLA VRLite 1 Library Interfaces 3 5 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VRLite 1 Library Interface F ee scale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 1 vrlite1 Create Call s vrlitel sHandle vrlitelCreate vrlitel sConfigure pConfig Required Header vrlite h Arguments Table 3 1 vrlite1 Create Arguments pConfig in Points to the configuration data for VRLite 1 Description The vrlite Create function creates an instance of VRLite 1 During the vrlite Create call any dynamic resources required by the VRLite 1 algorithm are allocated The memory allocation is External Memory 91 words Internal Memory 0 words The pConfig argument points to the vrlitel sConfigure structure used to configure VRLite 1 operation for details on this structure see Section 3 3 2 The vrlite I Create function allocates memory dynamically using the mem library routines as shown in Code Example 3 2 Code Example 3 2 Use of mem Library in vrlite1 Create function include port h in
45. nts in systems intended for surgical implant into the body or other applications intended to support or sustain life or for any other application in which the failure of the Motorola product could create a situation where personal injury or death may occur Should Buyer purchase or use Motorola products for any such unintended or unauthorized application Buyer shall indemnify and hold Motorola and its officers employees subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim of personal injury or death associated with such unintended or unauthorized use even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part Motorola and the Stylized M Logo are registered trademarks of Motorola Inc Motorola Inc is an Equal Opportunity Affirmative Action Employer MOTOROLA and the Stylized M Logo are registered in the US Patent amp Trademark Office All other product or service names are the property of their respective owners Motorola Inc 2002 How to reach us USA EUROPE Locations Not Listed Motorola Literature Distribution P O Box 5405 Denver Colorado 80217 1 303 675 2140 or 1 800 441 2447 JAPAN Motorola Japan Ltd SPS Technical Information Center 3 20 1 Minami Azabu Minato ku Tokyo 106 8573 Japan 81 3 3440 3569 ASIA PACIFIC Motorola Semiconductors H K
46. ocEM sizeof vrlitel sConfigure if pConfig NULL assert Out of memory Specifications When there are no words trained all the values of GlobalStats will be zeros These values are updated by the VRLite 1 algorithm and returned to the calling function through callback It is up to the calling module which calls Training API to store these returned values The user calling module can define a buffer of length 4 words and keep overwriting with the latest returned values During configuration for VRLite 1 through pConfig structure these stored values have to be assigned as shown below The values below are not zeros because we have some previously trained models stored in the file prev models in located at nos speech vrlitel test io X X X X X X X pConfig VrControlFlag VR RECOGNITION pConfig gt GlobalStats 0 0x007e pConfig gt GlobalStats 1 0x000e pConfig gt GlobalStats 2 0x0000 pConfig gt GlobalStats 3 0x00e0 pConfig gt Callback pCallback CallbackRecog pConfig gt Callback pCallbackArg Wordl6 amp BestWordOut Vrlitel instance creation and initialization pVrlitel vrlitelCreate pConfig if pVrlitel NULL assert Out of Memory Frontend processing for utterance res VR_FE_BUSY while res VR_FE_BUSY r LTI
47. ollowing sections e FRONTEND ROM a data ROM section VR COMMON ROM a data ROM section VR RECO ROM a data ROM section VR Y I MEM SHARE a data RAM section VR Y 2 MEM SHARE a data RAM section VR Y 3 MEM SHARE a data RAM section VR Y 4 MEM SHARE a data RAM section VR Y 5 MEM SHARE a data RAM section VR X MEM SHARE a data RAM section VR LONG MEM SHARE a data RAM section See Code Example 5 1 for an example linker cmd file used in the test application MOTOROLA Linking Applications with the VRLite 1 Library For More Information On This Product Go to www freescale com 5 1 ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Linking Applications with Fregscale Semiconductor Inc Code Example 5 1 Linker cmd file for DSP56824l ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 linker cmd File EVM External RAM using both internal and external data memory EX 0 and using external program memory Mode 3 EA Ae kk kk kk K K YK k k kk YK kk kk k k kk kk k kA kk K KOK K KOK KOK KOK KOK K KOK KOK KOK KOK KOK KOK k AA k I AK KOK KOR EMORY p p InterruptVector ExtRAM xAvailable X OX OX X X X X X x CWRegisters IntRAM DynamicMeml IntROM IntRAM DynamicMem2 Hole EXtRAM ExtRAM DynamicMem Stack Peripheralsl Peripherals2 Ext1Vrlitel Ext2Vrlitel Ext3Vrlitel Ext4Vrlitel Ext5Vrlitel Ext6Vrlitel
48. on all resources will be set to their initial values in preparation for VRLite 1 operation Before calling the vrlitel Init function a VRLite 1 instance must be created The VRLite 1 instance pVrlitel can be created either by calling the vrlite Create function see Section 3 3 1 or by statically allocating memory which does not require a call to the vrlite Create function The parameter pConfig points to a data structure of type vrlitel sConfigure its fields initialize VRLite loperation in the following manner VrControlFlag The bits of the control flag are shown below The numbers inside the box indicate the bit number LSB AAAA VR_HANDSFREE VR OUT OF VOCAB VR REJECTION ANALYSIS LAST VR RECOGNITION LAST VR REJECTION ANALYSIS VR RECOGNITION VR TRAINING VR ABORT MOTOROLA VRLite 1 Library Interfaces 3 11 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VRLite 1 Library Interface Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Table 3 3 Description of the fields of VrControlFlag Bit Name Bit Status Description VR ABORT set Indicates that VRLite must be aborted currently this feature is not applicable VR TRAINING set Indicates that VRLite is configured for training VR_RECOGNITION set Indicates that V
49. pplications software CodeWarrior project 3des mcp is Blue Text Linkable on line efer to Chapter 7 License Number Any number is considered a 3V positive value unless preceded 40 by a minus symbol to signify a negative value ALL CAPITAL Variables directives defined INCLUDE DSPFUNC LETTERS constants files libraries define INCLUDE STACK CHECK ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Brackets Function keys by pressing function key F7 Quotation marks Returned messages the message Test Passed is displayed Jf unsuccessful for any reason it will return NULL Definitions Acronyms and Abbreviations The following list defines the acronyms and abbreviations used in this document As this template develops this list will be generated from the document As we develop more group resources these acronyms will be easily defined from a common acronym dictionary Please note that while the acronyms are in solid caps terms in the definition should be initial capped ONLY IF they are trademarked names or proper nouns DSP FE HMM VO Digital Signal Processor or Digital Signal Processing Front End Hidden Markov Model Input Output VRLite 1 Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMI
50. rns None Special Considerations None Code Example 3 7 Use of vrlite1Destroy Interface include vrlitel h include mem h See Code Example 3 3 and Code Example 3 6 to learn how to use the vrlite Destroy function 3 22 VRLite 1 Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 4 Building the VRLite 1 Library 4 1 Building the VRLite 1 Library The VRLite 1 library combines all of the components described in previous chapter into one library vrlitel lib To build this library a Metrowerks CodeWarrior project vrlitel mcp is provided This project and all the necessary components to build the VRLite 1 library are located in the nos speech vrlitel directory of the SDK directory structure There are two methods to execute a system library project build dependency build and direct build 4 1 1 Dependency Build Dependency build is the easiest approach and requires no additional work on the user s part If you add the VRLite 1 library project vrlitel mcp to your application project as shown in Figure 4 1 the VRLite 1 library will automatically build when the application is built MOTOROLA Building the VRLite 1 Library 4 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTO
51. rocedure for Recognition Use of vrlitel RecognitionProcess Interface Mss of viel Destroy Te l ul u ede qoi ox e IRA dad V linkercmd Dilo Loosonqs ese ad EE C onnie S25 oes Gas 99S Edd List of Examples For More Information On This Product Go to www freescale com vii Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 viii Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VRLite 1 Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 About This Document This manual describes the Voice Recognition VRLite 1 algorithm for use with Motorola s Embedded Software Development Kit SDK Audience This document targets software developers implementing the voice recognition function within software applications Organization This manual is arranged in the following sections Chapter 1 Introduction provides a brief overview of this document Chapter 2 Directory Structure provides a description of the required core directories Chapter 3 VRLite 1 Library Interfaces describes all of the VRLite 1 Library functions Chapter 4 Building the VRLite 1 Library tells how to execute the system library project build Chapter 5 Linking Applications with the VRL
52. ructure under the speech directory J speech gt mm API Sources asm sources E test c sources E configextram U io m FH sys Figure 2 3 vrlite1 Directory Structure The vrlitel directory includes the following sub directories API Sources contains APIs for VRLite 1 asm sources includes asm sources required for VRLite 1 e test includes C source files and configuration necessary for testing VRLite 1 library modules c sources contains example test code for both training and recognition configextram contains the configuration files appconfig c appconfig h and linker cmd specific to VRLite 1 2 2 VRLite 1 Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 3 VRLite 1 Library Interfaces 3 1 VRLite 1 Services The VRLite 1 library supports voice recognition functionality through two services Training and Recognition The data to be supplied must be in 16 bit word fixed point 1 15 format as shown below MSB LSB 1 information bit s sign bit 3 2 Interface The C interface for the VRLite 1 library services is defined in the C header file vrlite h shown in Code
53. successful completion of the recognition process vrlitel RecognitionProcess returns VR RECOG PASS if recognition is busy and the next previous model should be supplied vrlitel RecognitionProcess returns VR RECOG BUSY Special Considerations Only one previous model can be passed at a time This implies that this API is to be called previous model number of times from the calling module see Code Example 3 6 Code Example 3 6 Use of vrlite1 RecognitionProcess Interface include vrlitel h include mem h define FRAME LEN 80 NOTE Frame length is defined to be 80 samples for illustration purposes only This value could be user s choice Function prototype void testVrlitelRecog The function below is an example for testing recognition Input and output buffers Wordl6 inputRecog FRAME LEN Input buffer containing FRAME LEN samples Word16 prevModelBuf HMM SIZE Each HMM model is always of size 91 void testVrlitelRecog vrlitel sHandle pVrlitel vrlitel sConfigure pConfig Int16 i Result res Word16 BestWordOut BW SIZE 3 18 VRLite 1 Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Set up the configuration pConfig vrlitel sConfigure memMall
54. tten by the user to collect the output given by the vrlite 1 TrainingProcess function Training thread of the VRLite 1 library Training returns 91 HMM values then returns 4 Global Statistics values through callback which should be collected by the user In this example WriteOutputTrn is a structure illustrating one of the simple ways of collecting these outputs In an embedded system environment these outputs must be stored in non volatile memory the user can do this directly in the callback function if Rejection Analysis is Off If Rejection Analysis is required On then the user can first copy the outputs into a temporary buffer as shown in Code Example 3 4 then copy them into non volatile memory depending upon the results of Rejection Analysis In this example during the first callback from the vrlite I TrainingProcess function the CallbackTrain function stores the 91 values in the hmmParam buffer of the WriteOutputTrn structure during which the pTemp offset would be zero While going out of this function the offset would be incremented so that during the next callback the 4 Global Statistics output values are written from the 92nd location onwards An example callback procedure for recognition is shown in Code Example 3 5 for reference 1 In this case user refers to the host function and not to the end user MOTOROLA VRLite 1 Library Interfaces 3 13 For More Information On This Product Go to www freescale com A
55. w Diagram MOTOROLA Introduction 1 3 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Introduction Prompt User for word User says word Y Search for best matching model for the word No Model found Display error message Display matching word and or play back matching word to user Figure 1 3 Recognition Flow Diagram 1 2 2 Features and Performance Features Speaker dependent isolated word recognition Reduced memory implementation Can train any number of models as long as there is no constraint on host memory Note The higher the number of trained models the slower the recognition Performance For details on Memory and MIPS for a particular DSP refer to the Libraries chapter of the appropriate Targeting manual 1 4 VRLite 1 Library For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 2 Directory Structure 2 1 Required Core Directories Figure 2 1 details required platform directories ESQ src dsp55824evm 5 nos HC applications E bsp 3 config 3 include B sys J tools
Download Pdf Manuals
Related Search
Related Contents
Feuille de salle - Les Subsistances Étude des pratiques de remédiation et de pédagogie différenciée Samsung Galaxy A5 Uživatelská přiručka Communauté de Commune Fier et Usses Meteotime Station météo Rénov`Perrier N°6 PIKA Application Development Suite (PADS) 2.0 Aeroccino + Aeroccino 3 - Nespresso Copyright © All rights reserved.
Failed to retrieve file