Jibe Audio Files

These are the supported formats of the recordings used in the JIBE solution.

.wav files: Linear PCM, 8000 Hz, 16-bit, mono
.al files: raw A-Law files, which don’t contain a header

Preferred format is alaw.

Converting the file in Audacity to 16 bit aLaw:

  • Open the recording.
  • Use the drop down menu on the top left of the wave form and select “Split to Mono”.
  • Now you can delete one of the wave forms, you only need one.
  • Use the Drop down menu again and select the “Format” and select “16 bit PCM”.
  • Click the “Tracks” and select “Resample” and select 8000.
  • Set Project Rate (Hz) to 8000
  • Now Select File and “Export Audio”.
  • Select “Other Uncompressed files” as the type.
  • Click the “Options…” button and select Header as “RAW (header-less)” and Encoding as “A-Law”.
  • Click ok.
  • Change the file extension to “.al” and save.

Converting the file to 16 bit mono wave in Audacity:

  • Open the recording.
  • Use the drop down menu on the top left of the wave form and select “Split to Mono”.
  • Now you can delete one of the wave forms, you only need one.
  • Use the Drop down menu again and select the “Set Sample Rate” and select “16 bit PCM”.
  • Click the “Tracks” and select “Resample” and select 8000.
  • Now Select File and “Export Audio”.

To open the .al files in audacity again

  • Select “File” → "Import " → “Raw Data”
  • Select the file you need to import.
  • Select the following settings:
    Encoding : A-Law
    Byte Order : Default endianness
    Channels : 1 channel ( mono)
    Start offset : 0
    Amount to import : 100%
    Sample Rate : 8000

FFMpeg convertion

ffmpeg -i input.wav -ac 1 -ar 8000 -acodec pcm_alaw output.wav

Example script

#!/bin/bash
fullfilename=$(basename -- "$1")
extension="${fullfilename##*.}"
filename="${fullfilename%.*}"

if [ -e $1 ]; then
  ./ffmpeg -i "$1" -ac 1 -ar 8000 -acodec pcm_alaw "$filename.al"
  ERROR=$?
  if [ $ERROR -eq 0 ]; then
    echo "Converted [$1] to [$filename.al]."
  else
    echo "Failed converting [$1] with error [$ERROR]"
  fi
else
  echo "[$1] not found"
fi