wiki:audio-check-play

Checking if Audio is Playing Properly by Playing a WAV File (moved)

Moved to: ​https://docs.pjsip.org/en/latest/specific-guides/audio-troubleshooting/checks/play_wav.html

First Check, Playing WAV File with pjsua

An easy way to check if speaker is functioning properly is by using pjsua to play a WAV file to the speaker, with these easy steps:

  1. Find any WAV file with the following specification:
    • any clock rate
    • mono (not stereo)
    • 16bit, PCM sample
  2. Run pjsua with the file:
      $ ./pjsua --play-file THEFILE.WAV
    
  3. Check that the file is registered to the bridge:
    >>> cl
    Conference ports:
    Port #00[16KHz/10ms] Primary Sound Capture Driver  transmitting to:
    Port #01[16KHz/10ms]          THEFILE.WAV  transmitting to:
    
  4. Play the file to the speaker:
    >>> cc 1 0
    Success
    
  5. Done. You should hear the file played to the speaker.

If you couldn't hear the file played properly to the speaker, then follow the next step.


If First Check Fails, try Playing the WAV File with playfile sample

If the file is not playing properly with pjsua, then try playing the file with playfile sample. The playfile sample binary should be put in pjsip-apps/bin/samples directory after the samples project is successfully built.

To play a WAV file with playfile sample:

 $ ./playfile THEFILE.WAV

The difference between pjsua and playfile program is the lack of conference bridge in playfile.

Troubleshooting

No audio is heard with both pjsua and playfile

Probably it's because:

  • the speaker is not working properly
  • the level is set too low
  • the WAV file contains blank recording
  • or something else..

Other problems

For other problems, please report to the mailing list.

Last modified 23 months ago Last modified on Feb 3, 2023 12:59:55 PM