# Also convert the raw audio on-the-fly to the GSM format using 'sox', so that # we can play it back to the user right now. open( $fh, "|/usr/bin/sox -t raw -r 8000 -s -b 16 -c 1 - /tmp/recording.gsm" ); # | | | | | | | # | | | | | | '-- Write to this file # | | | | | '-- Read from STDIN # | | | | '-- Mono Audio # | | | '---- Samples are words (a word is 2 bytes = 16 bit audio) # | | '---- The audio is signed (32766..-32766) # | '---- The sample rate is 8,000 samples/second # '---- The input format is SLIN, which is 'raw' audio