Special speech processing in brew

Source: Internet
Author: User

Ivocoder interfaces are provided for speech processing starting with brew2.x. The ivocoder interface uses the default sound path to capture and play audio frames. Because devices used by ivocoder can also be used to perform voice calls, applications using ivocoder must pay attention to and integrate TAPI notifications so that they can stop using voice calls in due time. The basic implementation process of the ivocoder interface is as follows:

1) Create the ivocoder interface. At the system level, this is to allocate a piece of memory space for ivocoder. The memory space is set based on application requirements.

2) Use Cases for ivocoder configuration, including the audio algorithm, data rate, and callback parameters.

Enhanced Variable-rate audible EVRC (is-127) can improve the quality of speech. In essence, the real-time data rate is controlled by the underlying phonograph of the mobile phone based on the signal-to-noise ratio and voice idleness. It cannot be forced to encode the data at a certain rate in the program, but brew still requires setting the upper and lower limits.

When an event related to a call volume occurs, you must register a related callback function with the system to queue in the system execution queue. When the system executes the callback function, the system can determine whether to continue, interrupt, or end the operation based on the callback function content. Of course, the process is also the process of generating new events, it means registering another

Callback function. That is to say, the callback function of a volume is a user-defined function that is automatically called by the system. Callback letter

The quality of the number configuration is directly related to whether the entire voice process is smooth or not.

3) Start and encode the voice.

Call the configured callback function havadatacb. In the callback function havadatacb, use the interface function ivocoder_vocinread () to collect voice at a frame and write data to the cache. Then, pack and send the package to the server. The buffer size must be sufficient to support the maximum frame rate of the volume, not just the maximum value used by the current rate limit.

The ivocoder_vocoutstop () function is used to stop the playing of the voice recorder, stop the processing of the voice, and release the ivocoder interface.

 

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/wireless_com/archive/2010/09/18/5892552.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.