Author |
|
bitherder Intermediate
Joined: August 14 2007 Location: United States Posts: 9
|
Posted: October 02 2007 at 9:51am | IP Logged
|
|
|
Our TTS output is 16 KHz PCM, and we can't see how to play it out over a connection. Changing TTS is absolutely out of the question, so we wonder if the MediaEngine has support for this need built in, and maybe we missed something?
The format rate converter doesn't handle 16 KHz samples in, so we can't use that, and the IVR functions all expect a LanScape standard rate.
How can we overcome this obstacle?
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: October 02 2007 at 10:12am | IP Logged
|
|
|
Hi bitherder,
Sending 16kHz TTS sampled data to phone lines:
We assume you are creating an IVR based application and want to transmit 16kHz PCM TTS (text to speech) prompts out the VOIP Media Engine phone lines.
Fortunately for this situation, the solution is simple. You must "down sample" your TTS data to 8kHz PCM before sending the sample block data to the Tx IVR phone line outputs.
To down sample the 16 kHz PCM TTS samples from the TTS engine to the required 8kHz PCM the media engine phone lines require, simply send every other 16kHz TTS sample to the media engine. This effectively down samples your original TTS samples to 8kHz.
The Tx IVR outputs of the media engine phone lines will have to be opened and configured to expect 8k PCM 20Ms sample blocks from your application code. For further info, see the SetTxIvrDataType() API procedure in the Software Developer's Reference. Also see the AUDIO_BW_PCM_8K audio data type of the AUDIO_BANDWIDTH enumeration.
So to summarize:
1)
Your application code will "down sample" the 16 kHz PCM samples from your TTS engine by taking every other sample from your TTS output stream. This gives you 8kHz PCM.
2)
Your application code will then gather 20Ms blocks (160 8kHz samples) of down sampled data and send these sample blocks directly to a media engine phone line Tx IVR outputs.
That's all.
Other notes:
The internals of the media engine have the ability to "up sample" and "down sample" PCM data to/from any sample rate. We are toying with the idea of breaking this capability out to the API but have not done so at this point. Maybe if enough users need or request this capability, we will do it.
Repost as needed.
Support
|
Back to Top |
|
|
bitherder Intermediate
Joined: August 14 2007 Location: United States Posts: 9
|
Posted: October 08 2007 at 8:55am | IP Logged
|
|
|
Maybe add AUDIO_BW_PCM_16K to the AUDIO_BANDWIDTH enumerations? That should let us put TTS output directly into the transmit channel.
Does the internal sample rate conversion include pre-conversion or post-conversion filtering?
thanks,
skip
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: October 09 2007 at 7:55am | IP Logged
|
|
|
Hi Skip,
We will take note of your request to put the AUDIO_BW_PCM_16K to the AUDIO_BANDWIDTH enumeration. Thanks for the tip.
<<< You
Does the internal sample rate conversion include pre-conversion or post-conversion filtering?
Support >>>
Not sure exactly what you are asking. Your app can do any pre or post filtering yourself. Whatever filtering you want to perform on the audio data pre or post is completely up to you.
The internal sample rate conversion we spoke of earlier can take any input rate PCM sample blocks and up or down sample the data to any other target sample rate. Down sampling will produce audio data that has as its highest frequency component ˝ the target down sampling rate. Up sampling the audio data will completely preserve the frequency spectrum with zero loss of frequency content.
For down sampling: To ensure that you do not get signal distortions due to the down sampling operation, you must first band limit your 16kHz data to 8kHz (or less).
Elaborate a bit more regarding what type of pre/post filtering you need.
Support
|
Back to Top |
|
|