The application scheme of voice remote control based on SPCE061A chip and audio coding algorithm

The above introduces the voice remote control that uses SPCE061A to complete the integrated functions of infrared remote control, voice recognition, voice temperature reporting, and time reporting. The system only uses a single chip to complete the voice processing and control functions. Compared with the dedicated voice processing chip, It has the characteristics of simple structure, low cost, and easy implementation. In addition, Sunplus Technology provides a rich C function library and voice processing function library for users to call, which shortens the development cycle.

The newest product SPCE061A of Yang Technology Company, not only has the function of the microcontroller, but also has the function of DSP operation, which can be used for digital voice (music) signal processing. Based ON this feature, we have designed a voice remote control, which can recognize frequently used radio stations and control commands, such as “power on”, “power off”, “channel increase”, “channel decrease” and other remote control commands and “Central One “”, “Beijing Second Station” and other radio command functions. For these radio stations, users can “call their name directly” to switch to the corresponding radio station without worrying about searching each time; it is also convenient for users to use in the dark at night; It is also a gospel for people with poor eyesight and blind people.

We have also added the functions of temperature collection and voice temperature reporting. Through the button control, she collects the current temperature and broadcasts “the current temperature is xx degrees Celsius” with a beautiful voice.

Without increasing the cost, the voice remote control has added perpetual calendar calculation and voice timekeeping functions. By pressing the button, she will broadcast “xxxx year xx month xx day” or “morning (afternoon, evening) x o’clock x o’clock”.

1 System composition

The air conditioner voice remote controller currently designed is mainly composed of keyboard input, MIC input, temperature acquisition, voice output, and infrared emission circuit. The button is used to complete the button remote control function —— retain the button function, voice temperature report, and time signal; SPCE061A has an A/D conversion circuit (MIC input) dedicated to voice signal collection, which can be used for voice recognition and recording The remote control is used to collect voice signals and perform voice recognition; SPCE061A has 7 channels of A/D, select 1 channel for temperature collection, and control the temperature broadcast by buttons; SPCE061A has a wealth of time base signals, using 2Hz Count and calculate the perpetual calendar, and the broadcast time is controlled by the button. The system composition is shown as in Fig. 1.

The application scheme of voice remote control based on SPCE061A chip and audio coding algorithm

2 hardware composition

The hardware circuit is shown in Figure 2:

The application scheme of voice remote control based on SPCE061A chip and audio coding algorithm

A total of 13 buttons are designed, using a 4×4 determinant keyboard input, IOA0—IOA3 are set as input ports, IOA8—IOA11 are set as output ports, and 3 buttons are reserved as spares.

The hardware circuit of speech recognition is relatively simple. The MIC uses electret microphones, which have the advantages of simple structure, light weight, small size, non-directionality, wide frequency response, and good fidelity. The bias voltage of the electret microphone is provided by the VMIC pin of SPCE500A.

SPCE061A provides dual-channel 10-bit D/A output AUD1 and AUD2. The output capacity of each DAC channel is 3mA, which is used to output voice signals. Considering power consumption, single-channel AUD1 output is adopted.

Using SPCE061A’s IOB8 output PWM signal (IOB8, IOB9 port special function) can be used as an infrared carrier signal, the carrier frequency is determined by the overflow frequency of the programmable timer TimerA (or TimerB). This remote controller uses IOB8 to generate infrared carrier signal.

The temperature sensor adopts ordinary negative temperature coefficient thermistor, which has high sensitivity and low price. (‘NSP ™ kernel is a general kernel structure. Other functional modules are optional structures, that is, this structure can be large, small, or optional. With this general structure, additional Choosing the building block structure of the structure can form a variety of different series of derivative products to suit different applications. This will undoubtedly make each derivative product have stronger functions and lower costs.

3 software design

The software adopts a modular program structure. The program modules include initialization, keyboard scanning, temperature acquisition, temperature reporting, perpetual calendar time calculation, perpetual calendar reporting, infrared emission, voice recognition, voice playback modules, etc. The program flow is shown in Figure 3: Figure 3 Flow picture

System initialization includes system clock, IO port, initial value of perpetual calendar, interrupt (turn on button to wake up and 2Hz interrupt), and then scan the buttons, there are buttons for corresponding processing, and no buttons enter sleep, the perpetual calendar calculation is carried out in the 2Hz interrupt service program.

Voice playback adopts the audio coding algorithm provided by Sunplus Technology, first record the prompt voice file (WAV file) on the PC, and compress it into a binary file by the compression tool provided by Sunplus, load it into the user program, compile the link and store it In the FLASH of the MCU, decompress and send D/A to restore the voice during playback. For SPCE series chips used in u’nSPTM core, Sunplus Technology provides three algorithms with different compression ratios. The following table shows the names of various compression algorithms and coding rate types.

The application scheme of voice remote control based on SPCE061A chip and audio coding algorithm

The difference between these three compression algorithms is that the compression rate is different, and the sound quality is also different. The SACM_A2000 compression rate is relatively small, the sound quality is better, and the corresponding resources are occupied more. SACM_S240 has the largest compression rate and relatively poor sound quality. SACM_S480 is somewhere in between. Each algorithm has a complete library function for the program to call, and the software is very convenient to write. This voice remote control uses the SACM_S480 algorithm.

Speech recognition is divided into two methods: Speaker Dependent and Speaker Independent.

Specific speaker recognition means that the voice model is trained by a single person, and the recognition accuracy of the voice command of the trained person is high, while the recognition accuracy of the voice command of other people is low or not recognized. Non-specific speaker recognition means that the voice model is trained by people of different ages, genders, and accents, and can recognize the commands of a group of people. The extraction of voice templates is very important. The voice remote control adopts the non-specific speaker recognition method.

Speech recognition is divided into two processes: speech model training and speech recognition. We call the storage space of the standard mode “thesaurus”, and call the standard mode “model”. The so-called voice template training is to perform spectrum analysis on the command to be recognized, and extract characteristic parameters as the standard mode of recognition. The process of voice recognition is to extract the characteristic parameters of the voice command, compare it with the template in the lexicon, and take the sample command serial number with the best similarity as the recognition result. Sunplus Technology provides voice model training tools and voice recognition library functions, which can recognize 30 voice commands each time. If there are more commands, it can be divided into multiple groups. The voice recognition process is shown in Figure 4:

The application scheme of voice remote control based on SPCE061A chip and audio coding algorithm

The above introduces the voice remote control that uses SPCE061A to complete the integrated functions of infrared remote control, voice recognition, voice temperature reporting, and time reporting. The system only uses a single chip to complete the voice processing and control functions. Compared with the dedicated voice processing chip, It has the characteristics of simple structure, low cost, and easy implementation. In addition, Sunplus Technology provides a rich C function library and voice processing function library for users to call, which shortens the development cycle. With a slight modification, this product can be used to control air conditioners, video recorders and other electrical appliances; using SPCE061A’s voice processing advantages, it can form voice response systems, voice synthesis systems, interactive toys, etc., with broad market prospects.

The newest product SPCE061A of Yang Technology Company, not only has the function of the microcontroller, but also has the function of DSP operation, which can be used for digital voice (music) signal processing. Based on this feature, we have designed a voice remote control, which can recognize frequently used radio stations and control commands, such as “power on”, “power off”, “channel increase”, “channel decrease” and other remote control commands and “Central One “”, “Beijing Second Station” and other radio command functions. For these radio stations, users can “call their name directly” to switch to the corresponding radio station without worrying about searching each time; it is also convenient for users to use in the dark at night; It is also a gospel for people with poor eyesight and blind people.

We have also added the functions of temperature collection and voice temperature reporting. Through the button control, she collects the current temperature and broadcasts “the current temperature is xx degrees Celsius” with a beautiful voice.

Without increasing the cost, the voice remote control has added perpetual calendar calculation and voice timekeeping functions. By pressing the button, she will broadcast “xxxx year xx month xx day” or “morning (afternoon, evening) x o’clock x o’clock”.

1 System composition

The air conditioner voice remote controller currently designed is mainly composed of keyboard input, MIC input, temperature acquisition, voice output, and infrared emission circuit. The button is used to complete the button remote control function —— retain the button function, voice temperature report, and time signal; SPCE061A has an A/D conversion circuit (MIC input) dedicated to voice signal collection, which can be used for voice recognition and recording The remote control is used to collect voice signals and perform voice recognition; SPCE061A has 7 channels of A/D, select 1 channel for temperature collection, and control the temperature broadcast by buttons; SPCE061A has a wealth of time base signals, using 2Hz Count and calculate the perpetual calendar, and the broadcast time is controlled by the button. The system composition is shown as in Fig. 1.

The application scheme of voice remote control based on SPCE061A chip and audio coding algorithm

2 hardware composition

The hardware circuit is shown in Figure 2:

The application scheme of voice remote control based on SPCE061A chip and audio coding algorithm

A total of 13 buttons are designed, using a 4×4 determinant keyboard input, IOA0—IOA3 are set as input ports, IOA8—IOA11 are set as output ports, and 3 buttons are reserved as spares.

The hardware circuit of speech recognition is relatively simple. The MIC uses electret microphones, which have the advantages of simple structure, light weight, small size, non-directionality, wide frequency response, and good fidelity. The bias Voltage of the electret microphone is provided by the VMIC pin of SPCE500A.

SPCE061A provides dual-channel 10-bit D/A output AUD1 and AUD2. The output capacity of each DAC channel is 3mA, which is used to output voice signals. Considering power consumption, single-channel AUD1 output is adopted.

Using SPCE061A’s IOB8 output PWM signal (IOB8, IOB9 port special function) can be used as an infrared carrier signal, the carrier frequency is determined by the overflow frequency of the programmable timer TimerA (or TimerB). This remote controller uses IOB8 to generate infrared carrier signal.

The temperature sensor adopts ordinary negative temperature coefficient thermistor, which has high sensitivity and low price. (‘NSP ™ kernel is a general kernel structure. Other functional modules are optional structures, that is, this structure can be large, small, or optional. With this general structure, additional Choosing the building block structure of the structure can form a variety of different series of derivative products to suit different applications. This will undoubtedly make each derivative product have stronger functions and lower costs.

3 software design

The software adopts a modular program structure. The program modules include initialization, keyboard scanning, temperature acquisition, temperature reporting, perpetual calendar time calculation, perpetual calendar reporting, infrared emission, voice recognition, voice playback modules, etc. The program flow is shown in Figure 3: Figure 3 Flow picture

System initialization includes system clock, IO port, initial value of perpetual calendar, interrupt (turn on button to wake up and 2Hz interrupt), and then scan the buttons, there are buttons for corresponding processing, and no buttons enter sleep, the perpetual calendar calculation is carried out in the 2Hz interrupt service program.

Voice playback adopts the audio coding algorithm provided by Sunplus Technology, first record the prompt voice file (WAV file) on the PC, and compress it into a binary file by the compression tool provided by Sunplus, load it into the user program, compile the link and store it In the FLASH of the MCU, decompress and send D/A to restore the voice during playback. For SPCE series chips used in u’nSPTM core, Sunplus Technology provides three algorithms with different compression ratios. The following table shows the names of various compression algorithms and coding rate types.

The application scheme of voice remote control based on SPCE061A chip and audio coding algorithm

The difference between these three compression algorithms is that the compression rate is different, and the sound quality is also different. The SACM_A2000 compression rate is relatively small, the sound quality is better, and the corresponding resources are occupied more. SACM_S240 has the largest compression rate and relatively poor sound quality. SACM_S480 is somewhere in between. Each algorithm has a complete library function for the program to call, and the software is very convenient to write. This voice remote control uses the SACM_S480 algorithm.

Speech recognition is divided into two methods: Speaker Dependent and Speaker Independent.

Specific speaker recognition means that the voice model is trained by a single person, and the recognition accuracy of the voice command of the trained person is high, while the recognition accuracy of the voice command of other people is low or not recognized. Non-specific speaker recognition means that the voice model is trained by people of different ages, genders, and accents, and can recognize the commands of a group of people. The extraction of voice templates is very important. The voice remote control adopts the non-specific speaker recognition method.

Speech recognition is divided into two processes: speech model training and speech recognition. We call the storage space of the standard mode “thesaurus”, and call the standard mode “model”. The so-called voice template training is to perform spectrum analysis on the command to be recognized, and extract characteristic parameters as the standard mode of recognition. The process of voice recognition is to extract the characteristic parameters of the voice command, compare it with the template in the lexicon, and take the sample command serial number with the best similarity as the recognition result. Sunplus Technology provides voice model training tools and voice recognition library functions, which can recognize 30 voice commands each time. If there are more commands, it can be divided into multiple groups. The voice recognition process is shown in Figure 4:

The application scheme of voice remote control based on SPCE061A chip and audio coding algorithm

The above introduces the voice remote control that uses SPCE061A to complete the integrated functions of infrared remote control, voice recognition, voice temperature reporting, and time reporting. The system only uses a single chip to complete the voice processing and control functions. Compared with the dedicated voice processing chip, It has the characteristics of simple structure, low cost, and easy implementation. In addition, Sunplus Technology provides a rich C function library and voice processing function library for users to call, which shortens the development cycle. With a slight modification, this product can be used to control air conditioners, video recorders and other electrical appliances; using SPCE061A’s voice processing advantages, it can form voice response systems, voice synthesis systems, interactive toys, etc., with broad market prospects.

The Links:   LB043WQ1-TD06 NL128102BC28-07