calejost / unimrcp

Automatically exported from code.google.com/p/unimrcp
Apache License 2.0
0 stars 0 forks source link

ULAW Data Being Sent to Client as 16-bit Linear WAV #136

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Attempt to synthesis a file via Nuance Speech Server in ulaw format.

What version of the product are you using? On what operating system?
unimrcp-sdk-1.0.0
Windows 7

Please provide any additional information below.

In a request to synthesize a file via Nuance Speech Server, using the PCMU 
codec, I can see in Wireshark that the data returned is in 8-bit, 8000Hz, ulaw 
format.

However, in writing the data to file, I have discovered the data is 16-bit, 
8000Hz, raw WAV data.

Attached are the configuration files used in generating the request, a 
Wireshark capture of the session and sample WAV files.

Nss_Generated.wav is the WAV file written by my client application (which is 
just writing the bytes sent to the write frame method of the 
mpf_audio_stream_vtable_t structure used in creating the channel) using Nuance 
Speech Server to access Nuance Vocalizer. 

Nvn_Generated.wav is the WAV file that would be generated by Nuance Vocalizer 
when accessed via API.

Original issue reported on code.google.com by p2mcd...@gmail.com on 21 Dec 2011 at 3:49

Attachments:

GoogleCodeExporter commented 8 years ago
After much more digging, much more trial and error and closer looks at a few 
samples, I found that I needed to add the PCMU codec as a capability to the 
audio termination using the following snippet:

mpf_codec_capabilities_add(
                        &capabilities->codecs,
                        MPF_SAMPLE_RATE_8000,
                        "PCMU");

Problem solved.

Original comment by p2mcd...@gmail.com on 4 Jan 2012 at 9:59

GoogleCodeExporter commented 8 years ago
Closing the issue, since the reported has already identified the problem.

Original comment by achalo...@gmail.com on 6 Mar 2013 at 7:55