Home

Software Development Kit - Freescale Semiconductor

image

Contents

1. The vadDestroy function must be called to deallocate the memory allocated by vadCreate Code Example In Code Example 3 3 the application creates an instance of VAD Code Example 3 3 Use of vadCreate Interface include vad h include mem h define VAD_BUF_LENGTH 50 User output buffer length typedef struct UInt16 VAD FLAG UInt16 offset vad sCallbackArg void Callback void pCallbackArg vad eResult VAD FLAG void test vad void vad sHandle pVag vad sConfigure pConfig vad sCallbackArg vad tCallbackArg pConfig vad sConfigure memMallocEM sizeof vad sConfigure User configuration of VAD vad tCallbackArg vad sCallbackArg memMallocEM sizeof vad sCallbackArg MOTOROLA VAD Library Interfaces 3 5 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VAD Library Interfaces Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 vad_tCallbackArg gt VAD_FLAG UInt16 memMallocEM sizeof UInt16 VAD_BUF_LENGTH vad tCallbackArg offset 0 pConfig callback pCallback Callback pConfig callback pCallbackArg vad sCallbackArg vad tCallbackArg Create and init the instance of VAD pVad vadCreate pConfig 3 3 2 vadinit Call s Result vadInit vad_sHandle pVad vad_sConfigure pConfig Required He
2. EC Sources i Ki B vad_init c p B vad create c 57 B vad_process c 1164 Bp vad_destroy c 27 Figure 4 2 vad mcp Project Step 2 Execute the build by pressing function key F7 or by choosing Make from the Project menu see Figure 4 3 4 2 Voice Activity Detector Library MOTOROLA For More Information On This Product Go to www freescale com Freescale Semiconductor Inc ii ding the VAD Library ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Metrowerks CodeWarrior Project Bg Add e irielry Link Orde HECK Syta Bikes EDIGGESS EGGITIDTIE ampie BET ES E mE C Sources Wisasseriule Make ED Stop S UIT Str EATER Figure 4 3 Execute Make At this point if the build is successful the vad lib library file is created in the nos telephony vad Debug directory Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 MOTOROLA Building the VAD Library 4 3 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Building the VAD Library Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 4 4 Voice Activity Detector 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
3. The applications directory includes high level software that exercises the vad library For example Figure 2 4 shows the location of the demo vad application under telephony in the applications directory 3 applications applications Data G codec E des E eeprom 5 serial G telephony SEES c sources E Config E inputs E outputs C dtmf det E dtmf gen G 9165 G 9711 C G726_demo EE 8 E Figure 2 4 VAD Applications MOTOROLA Directory Structure 2 3 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Directory Structure 2 4 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Voice Activity Detector 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 3 VAD Library Interfaces 3 1 VAD Services The VAD library checks for speech segments in the speech signal and sets a flag if the algorithm detects a speech segment The data to be supplied must be in 16 bit word fixed point 1 15 format shown in the following table S MSB LSB 1 information bit s sign 3 2 Interface
4. 2005 Xii Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Voice Activity Detector 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 Activity Detection VAD Library which is a part of Motorola s comprehensive Software Development Kit SDK for its DSPs In this manual you will find all the information required to use and maintain the VAD Library interface and algorithms Motorola provides these algorithms to you for use on the Motorola DSPs to expedite your application development and reduce the time it takes to bring your own products to market Motorola s VAD 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 s 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 abo
5. 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 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 revo
6. vadDestroy pVad return NULL pVad gt pCallback vad sCallback memMallocEM sizeof vad_sCallback if pVad pCallback NULL vadDestroy pVad return NULL 3 4 Voice Activity Detector 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 vadInit pVad pConfig return pVad Specifications For details on the vad sHandle structure refer to Code Example 3 1 If a vadCreate function is called to create an instance then the vadDestroy function see Section 3 3 4 is used to destroy the instance Alternatively the user can allocate memory statically which requires duplicating all statements in the vadCreate function In this case the user can call the vadInit function directly bypassing the vadCreate function If the user dynamically allocates memory without calling vadCreate then the user himself must destroy the memory allocated Returns Upon successful completion the vadCreate function will return a pointer to the specific instance of VAD created If vadCreate is unsuccessful for any reason it will return NULL Special Considerations e The VAD application is multichannel and re entrant If vadCreate is called then the user need not call the vadInit function as it is called internally in the vadCreate function
7. void pCallbackArg vad eResult VAD FLAG void test vad void vad sHandle pVag vad sConfigure pConfig vad sCallbackArg vad tCallbackArg Int16 InBuffer 100 UInt16 length 100 Result res pConfig vad sConfigure memMallocEM sizeof vad sConfigure User configuration of VAD vad_tCallbackArg vad sCallbackArg memMallocEM sizeof vad sCallbackArg vad tCallbackArg VAD FLAG UInt16 memMallocEM sizeof UInt16 VAD_BUF_LENGTH MOTOROLA VAD Library Interfaces 3 11 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VAD Library Interfaces res vadProcess vadDestroy 3 12 pConfig cal pConfig cal Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 vad tCallbackArg offset 0 lback pCal lback pCal lback Callback lbackArg vad sCallbackArg vad tCallbackArg Create and init the instance of VAD pVad vadCreate pCon pVad Fig pVad InBuffer length Voice Activity Detector 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 4 Building the VAD Library 4 1 Building the VAD Library The VAD library combines all of the components describ
8. The C interface for the VAD library services is defined in the C header file vad h shown in Code Example 3 1 as a reference Code Example 3 1 C Header File vad h File vad h ifndef VAD H define _ VAD H Voice Activity Detection interface uf RR KKK KKK kk jk kk ke ke kk oko ke ek ke k k k Foundational Include Files FI KKK A A HK include port h MOTOROLA VAD Library Interfaces 3 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VAD Library Interfaces Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VadResult which is defined in vad_sCallback struct below takes one of the following enum values typedef enum VAD_VOICE_NOT_DE VAD_VOICE vad_eResult ECTED D LE rH Jg tj Q 4 J EEK K KKK KKK KK KK A k ke ko I IK k k KK ke k kk k k k k ke Structure for VAD Configuration FRA RA A A A AAA A He HH He IH f typedef struct void pCallback void pCallbackArg vad eResult VadResult void pCallbackArg vad sCallback typedef struct vad_sCallback callback vad sConfigure typedef struct Int16 pInContextBuf Int16 ContextBufLength Intl6 beta UWord32 EnergyNInit UWord32 EnergySInit UWord32 EnergyN UWord32 EnergyS UIntli6 FlagF UInt16 Counter UIntl16 HangCnt UInt16 HangConst UIntl6 B
9. pointer parameter is not changed MOTOROLA VAD Library Interfaces 3 3 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VAD Library Interfaces Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 1 vadCreate Call s vad_sHandle vadCreate vad_sConfigure pConfig Required Header vad h Arguments Table 3 1 vadCreate Arguments pConfig in Points to the configuration structure for VAD Description The vadCreate function creates an instance of VAD The pConfig argument points to the vad sConfigure structure used to configure VAD operation For initialization of the vad sConfigure structure see vadInit Section 3 3 2 During the vadCreate call any dynamic resources required by the VAD algorithm are allocated In each instance 84 words of external data memory are allocated The library allocates memory dynamically using the mem library as shown in Code Example 3 2 The VAD library is multichannel and re entrant Code Example 3 2 mem Library include mem h include vad h define FRAME SZ 64 vad sHandle vadCreate vad sConfigure pConfig vad sHandle pVad Result res pVad vad sHandle memMallocEM sizeof vad sHandle if pVad NULL return NULL pVad gt pInContextBuf Intl16 memMallocEM FRAME SZ sizeof Int10 if pVad pInContextBuf NULL
10. the VAD Library 5 1 VAD Library The library includes APIs which provide interface between the user application and the VAD modules To invoke VAD APIs must be called in the following order vadCreate y vadInit y vadProcess y vadDestroy y 5 1 1 Library Sections The VAD Library contains no assembly code To develop Debug applications with the VAD Library use the default linker cmd file Because the VAD library is written in C language there are no specific program and data sections to be included in the inker cmd file Please see the linker cmd example file in the telephony vad test_vad Config directory found in the Software Development Kit SDK A sample linker cmd file is included in Code Example for the reference Code Example 5 1 inker cmd Linker cmd file for DSP56824EVM External RAM T using both internal and external data memory EX 0 and using external program memory Mode 3 MEMORY pram RWX ORIGIN 0x0000 LENGTH OxFF80 external program memory avail RW ORIGIN 0x0000 LENGTH 0x0030 available cwregs RW ORIGIN 0x0030 LENGTH 0x0010 4 C temp registrs in CodeWarrior MOTOROLA Linking Applications with the VAD Library 5 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Linking Applications with Froarcals Semicondu
11. to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 6 VAD Applications 6 1 Test and Demo Applications To verify the VAD 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 VAD Applications 6 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VAD Applications Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Voice Activity Detector 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 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
12. AGES 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 License Motorola does not represent or warrant that the Software is free of infringement of any third party patents copyrights trade secrets 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
13. CALE SEMICONDUCTOR INC 2005 List of Tables Table 3 1 Table 3 2 Table 3 3 Table 3 4 MOTOROLA yad reme Armens 2544650 eos eee es ede ee see teense E PA du ER vad ACE iai d eS SERS a ere yadProcess a ke a COPI ee eae ese es vadDestroy Arputibyili nascknasck raketi auda AE ARAS EAR ARA 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 Voice Activity Detector 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 2 1 Figure 2 2 Figure 2 3 Figure 2 4 Figure 4 1 Figure 4 2 Figure 4 3 MOTOROLA Core DESCOUBS 122244922 56465545 45b4558 5456400504 beans ed dS EU Doma Specie DUDSMOUEE 625445053 Ka deed obese 45852405588 s eee eRe yad Directory SUNCE 032 CEPR ee eee eee VAD Applications anspasc sesxsbhtrbqkr Rte Rd ubakkbdRr Rod d dp pa Dependency Build for VAD Library cooked EAR R3 ERSGFREASAEES AREE vad miep Pro diari qo dc e oar mn aren ar rer ene ae oe d o ed sor roo rr 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 Semic
14. Freescale Semiconductor Inc Q mororora Embedded SDK Software Development Kit Voice Activity Detector Library SDK122 D Rev 2 07 23 2002 alse z L Motorola Inc 2002 All rights reserved P intelligence everywhere digitaldna 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 ANE ee ee eee eee ee eee ee ree MI Sq Ira d Edd ix Ci AG EE E T O E E ee Rae ix Supsasg Redi cic sande ei eaeiueeebacede de eae ceeds baedee ARE dh ARA ix W n a EEE E EE E E E S P EVER VP Eds X Definitions Acronyms and Abbreviations 2 4424 4020dseieaseracienaeen ss X oh cod bbb et aq arid auiem dde added ed rant d Ir qb dido dn xi Chapter 1 Introduction Ll solw ol FP C O99 1 1 12 S id OF fo UM 1 1 1 2 1 Dabo oos eX PRAASPEPRIREMETSNTTVRUS NE VR PESAANT EVEN ed TP EN 1 1 122 Poubuce and PRS ch och Ord dc Ds e dior qCi e ON a IRR Hp QU NU M RUN 1 2 Chapter 2 Directory Structure 24 Required Core Directories 4 eesds0eseeyes eedengseeeed ESTA UPPER E Rp 2 1 2 2 Optional Doma
15. ader vad h Arguments Table 3 2 vadlnit Arguments pVad in Handle to an instance of VAD pConfig in A pointer to a data structure containing data for initializing the VAD algorithm Description The vadInit function will initialize the VAD algorithm During initialization all resources will be set to their initial values in preparation for VAD operation The parameter pVad must have been generated from a call to vad Create The parameter pConfig points to a data structure of type vad sConfigure its fields initialize VAD operation in the following manner Callback A structure of type vad_sCallback it describes the procedure which VAD will call once 64 samples are processed by the algorithm The callback procedure has the following declaration void pCallback void pCallbackArg vad eResult VadResult The callback procedure parameter pCallbackArg is supplied by the user in the vad_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 The vadResult will take one of the following enum values VAD VOICE NOT DETECTED VAD VOICE DETECTED An example callback procedure is shown as a reference in Code Example 3 44 You must write your own callback procedure This callback procedure stores the vadResult in a buffer spec
16. allocEM sizeof vad sCallbackArg vad tCallbackArg VAD FLAG UInt16 memMallocEM sizeof UInt16 VAD BUF LENGTH vad tCallbackArg offset 0 pConfig callback pCallback Callback pConfig callback pCallbackArg vad sCallbackArg vad tCallbackArg Create and init the instance of VAD pVad vadCreate pConfig res vadProcess pVad InBuffer length 3 10 Voice Activity Detector 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 4 vadDestroy Call s Specifications void vadDestroy vad_sHandle pVad Required Header vad h Arguments Table 3 4 vadDestroy Arguments pVad in Handle to an instance of VAD generated by a call to vadCreate Description The vadDestroy function destroys the instance of the VAD originally created by a call to vadCreate Returns None Special Considerations During a call to vadDestroy any remaining samples in the context buffer which do not make a 64 sample frame are not processed Code Example 3 7 Use of vadDesiroy Interface include vad h include mem h define VAD_BUF_LENGTH 50 User output buffer length typedef struct UInt16 VAD_FLAG UInt16 offset vad sCallbackArg void Callback
17. 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 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
18. cable 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 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 MOTOROLA License 7 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 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 DAM
19. 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 Voice Activity Detector 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 D vadCreate 3 4 vadDestroy 3 10 DSP x vadInit 3 6 DSP56800 Family Manual xi DSP56824 User s Manual xi E Embedded SDK Programmer s Guide xi F FFT x FIR x vadProcess 3 8 Voice activation detection 1 1 I O x IDE x IIR xi LSB xi M MAC xi MIPS xi MSB xi O OMR xi OnCE xi P PC xi SDK xi SP xi SPI xi SR xi SRC xi V VAD xi 1 1 VAD Applications 6 1 VAD modules 5 1 VAD Services 3 1 vad sConfigure 3 6 vad sHandle 3 4 MOTOROLA Index 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 Voice Activity Detector 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 For More Information On This P
20. ctor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 iml rom im2 hole data em stack onchipl onchip2 FORCE ACTIVE RW ORIGIN 0x0040 LENGTH 0x07CO data 1 R ORIGIN 0x0800 LENGTH 0x0800 internal data ROM RW ORIGIN 0x1000 LENGTH 0x0600 data 2 R ORIGIN 0x1600 LENGTH 0x0A00 hole RW ORIGIN 0x2000 LENGTH 0xC000 data segment RW ORIGIN 0xE000 LENGTH 0x1000 data 3 RW ORIGIN OxF000 LENGTH OxOF80 stack RW ORIGIN OxFF80 LENGTH 0x0040 on chip peripheral registers RW ORIGIN OxFFCO LENGTH 0x0040 on chip peripheral registers FconfigInterruptVector SECTIONS Data X Memory Layout _EX_BIT 0 Internal Memory Partitions for mem h partitions NUM IM PARTITIONS 2 iml and im2 4 External Memory Partition for mem h partitions NUM EM PARTITIONS 1 em main application code text sections config c MUST be placed first otherwise the Interrupt Vector configInterruptVector will not be located at the correct address P 0x0000 config c text text rtlib text fp engine text user text gt pram main application data Define variables for C initialization code F_Xdata_start_addr_in_ROM ADDR rom SIZEOF rom 2 F_StackA
21. ddr ADDR stack F_StackEndAddr ADDR stack SIZEOF stack 2 1 5 2 Voice Activity Detector Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 1S FArchIO MOTOROLA Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 F Xdata start addr in RAM Memory layout data for SDK INCLUDE_MEMORY mem h support FmemEXbit WRITEH _EX_BIT FmemNumIMpartitions WRITEH NUM IM PARTITIONS FmemNumEMpartitions WRITEH NUM EM PARTITIONS FmemIMpartitionList WRITEH ADDR im1 WRITEH SIZEOF iml 2 WRITEH ADDR im2 WRITEH SIZEOF im2 2 FmemEMpartitionList WRITEH ADDR em WRITEH SIZEOF em 2 data sections 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 data ADDR onchip2 Linking Applications with the VAD Library For More Information On This Product Go to www freescale com VAD Library ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Linking Applications with Froarcals Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 5 4 Voice Activity Detector Library For More Information On This Product Go
22. ed in previous sections into one library vad lib To build this library a Metrowerks CodeWarrior project vad mcp is provided This project and all the necessary components to build the VAD library are located in the zos telephony vad 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 VAD library project vad mcp to your application project as shown in Figure 4 1 the VAD library will automatically build when the application is built MOTOROLA Building the VAD Library 4 1 For More Information On This Product Go to www freescale com a Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Building the VAD Library Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 g Hy Example mcp Link Order Targets g 343 Dependencies HA SDK Configuration ne SDK Projects D bsp mep 3 tools mep g pi Libs HE MSL SH C Sources E Es Es Ee Ee Es E Es E Figure 4 1 Dependency Build for VAD Library 4 1 2 Direct Build Direct build allows you to build a VAD library independently of any other build Follow these steps Step 1 Open vad mcp project as shown in Figure 4 2 m vad_mcp OF XI e Library hy Qa b v EL ES aa
23. es pConfig vad sConfigure memMallocEM sizeof vad sConfigure User configuration of VAD vad_tCallbackArg vad sCallbackArg memMallocEM sizeof vad sCallbackArg vad tCallbackArg VAD FLAG UInt16 memMallocEM sizeof UInt16 VAD_BUF_LENGTH MOTOROLA VAD Library Interfaces 3 7 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VAD Library Interfaces 3 8 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 vad tCallbackArg offset 0 pConfig cal lback pCal pConfig cal lback pCal lback Callback lbackArg vad sCallbackArg vad tCallbackArg Statically Create the instance of VAD res vadInit pVad pConfig Voice Activity Detector 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 3 3 3 vadProcess Call s Specifications Result vadProcess vad sHandle pVad Intl6 pSamples UInt16 NumSamples Required Header vad h Arguments Table 3 3 vadProcess Arguments pVad in Handle to an instance of VAD pSamples in Pointer to speech samples to be used by the VAD algorithm NumSamples in The number of samples to be processed Description The
24. ficers 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 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 SDK122 D Go to www freescale com
25. ified by the user through the pCallbackArg pointer For details about vad sCallbackArg see Code Example 3 3 3 6 Voice Activity Detector 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 Code Example 3 4 Sample Callback Procedure Specifications void Callback void pCallbackArg vad_eResult VAD_FLAG vad_sCallbackArg vad_tCallbackArg vad_tCallbackArg vad_sCallbackArg pCallbackArg vad tCallbackArg VAD FLAG vad tCallbackArg offset VAD FLAG vad tCallbackArg offset tt return Returns Upon completion a value of PASS will be returned Special Considerations If vadCreate is called then the user need not call vadInit function as it is called internally in the vadCreate function Code Example In Code Example 3 5 the application creates an instance of VAD which is passed to vadInit along with the VAD configuration structure pConfig Code Example 3 5 Use of vadinit Interface include vad h include mem h define VAD_BUF_LENGTH 50 User output buffer length typedef struct UInt16 VAD_FLAG UInt16 offset vad sCallbackArg void Callback void pCallbackArg vad eResult VAD FLAG void test vad void vad sHandle pVag vad sConfigure pConfig vad sCallbackArg vad tCallbackArg Result r
26. in Specific Directones lt lt lt c4e0sceecesssiesdesvesees 2 2 Chapter 3 VAD Library Interfaces 3 1 VAD es i oa sees 9 4 0 94 8 214 LO Up EEEE ENE di cp 3 1 3 4 ng o oe oe ee ee ree errr ere ere rere rT eee rrr ee ee 3 1 i ie AI Sd hee EN ME MEM 3 3 3 3 1 i0 Tre ee ee eee eee ee ee ee PPP 3 4 33 2 SAID ciotd ud dado icd opa dn E RARI IUe bid A Sa 3 6 Be eo rn ho ee eo A nme 3 8 3 3 4 AOC 5 bh 456 RSS e664 SERS Se PEERS RENTES XE eS Y eds 3 10 Chapter 4 Building the VAD Library 4 1 Bag he VAD La hen EIE E DOE ER eh Cadet ad da dcs 4 1 4 1 1 Dependency Buill osc 644559 44492 4045604565300 040546 a 4 1 4 1 2 Diot DURE C dakinen a a E TET 4 2 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 5 Linking Applications with the VAD Library IA ea LAG TIL LC nr SI LIBE ODDO oi coco cdm dob es edge qupd eU oa dub ded da lu dc dm Gc Chapter 6 VAD Applications 6 1 Test and Domo Applications 232444442 RT FERES AR HA ua rh Ed aan d Chapter 7 License T4 Limited Use Lipensp Agreement oasaexscerzedec et rr eR dE NETT e REY ii Voice Activity Detector Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREES
27. lgorithm for use with Motorola s Embedded Software Development Kit SDK Audience This document targets software developers implementing VAD function within software applications Organization This manual is arranged in the following sections e Chapter 1 Introduction provides a brief overview of this document e Chapter 2 Directory Structure provides a description of the required core directories e Chapter 3 VAD Library Interfaces describes all of the VAD Library functions e Chapter 4 Building the VAD Library tells how to execute the system library project build e Chapter 5 Linking Applications with the VAD Library describes the organization of the VAD Library e Chapter 6 VAD Applications describes the use of VAD Library through test demo applications e 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 e 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 e
28. nerated 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 FFT FIR T O Digital Signal Processor or Digital Signal Processing Fast Fourier Transforms Finite Impulse Response Input Output Voice Activity Detector 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 IDE Integrated Development Environment IIR Infinite Impulse Response LSB Least Significant Bit MAC Multiply Accumulate MIPS Million Instructions Per Second MSB Most Significant Bit OnCE On Chip Emulation OMR Operating Mode Register PC Program Counter SDK Software Development Kit SP Stack Pointer SPI Serial Peripheral Interface SR Status Register SRC Source VAD Voice Activity Detector Voice Activity Detection 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 MOTOROLA Preface For More Information On This Product Go to www freescale com Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC
29. onductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Voice Activity Detector 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 Example 3 1 Example 3 2 Example 3 3 Example 3 4 Example 3 5 Example 3 6 Example 3 7 Example 5 1 MOTOROLA C He der File VAL 44527 71 24 0046 0 909 9 ERE Rb E EE EE UM Ur S AFER TET OI ITE Use or yad reale Te oo ha 0 SK RS eee RS Sampe Callback Procee 24 ccwe seeaGegatestecumeeerGaussuseaeun Use Of vedln Interface coc cccedenescwncee enn cencd AR EARS AU rare AR AA A Ues ot vadProcess Is ecko Va redai tton PECES PREFREKERETPRREX CEPS Use ot vadDestoy Merna E ea oio ura oco X ES e EORR een TGC IO yo oe ik eA E SUUS RCRUM doa activae doc d Re aae dora a 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 Voice Activity Detector 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 Activity Detection VAD a
30. roduct 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 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 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 of
31. strates how the VAD algorithm is encapsulated in the domain specific directories under the directory telephony a dsp56824evm Eg nos WC applications C3 bsp E buildall Data E config 5g include E modem I security E signal E sys E telephony H 0 caller id ditmf det J g165 3 a711 Gq G726 G telephony Data am Figure 2 2 Domain Specific Directories EAE Oa Esmee soe see RR The telephony directory includes telephony specific algorithms Figure 2 3 shows the vad directory structure Eg telephony caller id E dtmf det G3 gi65 G3 g71 G3 6726 E telephony Data E vad C sources EI DIE C c sources zy Config E inputs I outputs H E tools Figure 2 3 vad Directory Structure 2 2 Voice Activity Detector Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semicondustor Me isin specitic Directories ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 The vad directory includes the following sub directories c sources includes the APIs for VAD fest vad includes these sub directories c sources contains an example test code Config contains configuration files appconfig c appconfig h and linker cmd specific to VAD inputs contains a speech file for testing VAD outputs contains reference VAD output
32. to the Libraries chapter of the appropriate Targeting manual 1 2 Voice Activity Detector 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 2 Directory Structure 2 1 Required Core Directories Figure 2 1 details required platform directories Bay sic C dspbB824evm ay applications Eg bsp al contig zg Include Eg sys H E tools 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 e 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 e Sys contains required system components tools contains useful 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 demon
33. urstCnt UIntl6 BurstConst vad sCallback pCallback jvad sHandle S EE KK K K KKK kj kk ke ke ke ke ke k ke k k ke e ek Function Prototypes Fe KKK A A ke ke I I ke k typedef struct vad sHandle vad tHandle EXPORT vad sHandle vadCreate vad sConfigure pConfig EXPORT Result vadInit vad sHandle pVad vad sConfigure pConfig EXPORT void vadDestroy vad sHandle pVad endif 3 2 Voice Activity Detector Library For More Information On This Product Go to www freescale com EXPORT Result vadProcess vad sHandle pVad Intl6 pSamples UInt16 NumSamples MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 Specifications Specifications The following pages characterize the VAD 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 function 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
34. ut this hardware architecture If you are developing an application for a DSP56824EVM board or any other DSP56824 development system refer to the Targeting DSP56824 Platform manual for Quick Start or other DSP56824 specific information 1 2 Overview of VAD Voice activation detection is used to save bandwidth by sending packets only when speech is present The effectiveness of the voice activity detector can be determined by measuring these factors 1 Front end clipping which is the amount of time it takes a voice activity detector to detect speech and begin transmitting audio 2 Holdover time which is the amount of time needed to determine that speech is no longer present and to stop transmitting background audio 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 1 2 1 Background Introduction The VAD detects voice activity and activates or deactivates the transmission of packets to optimize bandwidth When no activity is detected the encoder output will not be transported across the network Idle noise is reproduced by the remote end when there is no voice activity so the remote user will not believe that the line has gone dead 1 2 2 Features and Performance The VAD library is multichannel and re entrant For details on Memory and MIPS for a particular DSP refer
35. vadProcess function will process the samples supplied by pSamples Once the processing is complete the result is returned to the user by calling the Callback procedure The user can call the vadProcess function any number of times as long as there is data Returns Upon completion vadProcess will return PASS Special Considerations e The vadProcess function makes a call to the Callback procedure only when 64 samples of data are processed e After processing 64 samples vadProcess function does a callback with either VAD VOICE DETECTED speech frame or VAD VOICE NOT DETECTED silence frame Code Example 3 6 Use of vadProcess Interface include vad h include mem h define VAD_BUF_LENGTH 50 User output buffer length typedef struct UInt16 VAD_FLAG UInt16 offset vad sCallbackArg void Callback void pCallbackArg vad eResult VAD FLAG void test vad void vad sHandle pVag vad sConfigure pConfig vad sCallbackArg vad tCallbackArg Intl6 InBuffer 100 UInt16 length 100 Result res MOTOROLA VAD Library Interfaces 3 9 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 VAD Library Interfaces Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 pConfig vad sConfigure memMallocEM sizeof vad sConfigure User configuration of VAD vad_tCallbackArg vad sCallbackArg memM
36. xamples expressions datatypes and directives Foundational include files a data structure of type vad_tConfigure Italic Calls functions statements the pConfig argument e a e 7 defined in the C header file aec 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 applications 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 410 by a minus symbol to signify a negative value DES 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 if 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 ge

Download Pdf Manuals

image

Related Search

Related Contents

Z Night Party - Limoges Métropole  Mr. Heater MH35LP User's Manual  Après-midi découverte d`outils  Plastifieuse A3 ULG 300 A1  Blanco Diamond 511-642 User's Manual  Parent Access User Manual  Sandberg AC charger USB iPad 2100mA UK  Corporate Application Form  schede attrezzature - Provincia di Pistoia  Manual de instrucciones  

Copyright © All rights reserved.
Failed to retrieve file