pythonsipvoiprtp

PyVoIP write_audio send really bad quality sound


I use pyvoip 2.0.0-dev(because it's supporting OPTIONS requests and digest auth). I have this audio file and when my script uses write_audio method on the phone I hear only noises. Can it related with different codes on the client and server or server doesn't support PCMA\PCMU codes?


Solution

  • Note: Audio must be 8 bit, 8000Hz, and Mono/1 channel. You can accomplish this in a free program called Audacity. To make an audio recording Mono, go to Tracks > Mix > Mix Stereo Down to Mono. To make an audio recording 8000 Hz, go to Tracks > Resample… and select 8000, then ensure that your ‘Project Rate’ in the bottom left is also set to 8000. To make an audio recording 8 bit, go to File > Export > Export as WAV, then change ‘Save as type:’ to ‘Other uncompressed files’, then set ‘Header:’ to ‘WAV (Microsoft)’, then set the ‘Encoding:’ to ‘Unsigned 8-bit PCM’

    once you got the audio will work , but quality audio is bad , I will love to improve it