Pergunta

Hi I am using the NAudio library at http://naudio.codeplex.com/

I have this hardware made by some manufacturer which claims to send audio with the following characteristics.

aLaw 8khz, AUD:11,0,3336,0

Not sure what it all means at this stage.

I received bunch of bytes from this device when a user speaks into the equipment. Hence I am constantly recieving a stream of bytes at particular times

At this stage I have been unable to decode the audio so I can hear what is spoken into the device with my headphones.

I have tried writing the audio to a file doing code like

FWaveFileWriter = new WaveFileWriter("C:\Test4.wav", WaveFormat.CreateALawFormat(8000, 1));

And have been unable to playback the sound using the sample demo apps.

I have tried similar code from

http://naudio.codeplex.com/Thread/View.aspx?ThreadId=231245 and http://naudio.codeplex.com/Thread/View.aspx?ThreadId=83270

and still have not been able to achieve much.

Any information is appreciated. Thanks Allen

Foi útil?

Solução

If you are definitely receiving raw a-law audio (mono 8kHz) then your code to create a WAV file should work correctly and result in a file that can play in Windows Media Player.

I suspect that maybe your incoming byte stream is wrapped in some other kind of protocol. I'm afraid I don't know what "AUD:11,0,3336,0" means, but that might be a place to start investigating. Do you hear anything intelligible at all when you play back the file?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top