Advertisement
Guest User

lord-carlos

a guest
Jan 6th, 2009
551
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.32 KB | None | 0 0
  1. #Hey guys,
  2.  
  3. #here is my all-in-one script for postprocessing work after dect_cli.
  4. #The interesting part for you will be the mixing part, which searches for the matching files and mixes them to one call-xxx-file ;)
  5.  
  6. #You will have the known _fp.ima.wav and _pp.ima.wav as usual but also the call-dump-XX_xx_xx_xx_xx.wav file.
  7.  
  8. #Cheers
  9. #burgi
  10.  
  11.  
  12. #===== CODE ======
  13.  
  14. export LD_LIBRARY_PATH=/usr/lib
  15.  
  16. #clear up old stuff (but leaves the call-files alone)
  17.        rm *.ima.wav
  18.        rm *.ima
  19.  
  20. #pcapstein
  21.        for i in `/bin/ls -1 *.pcap` ; do
  22.               ./pcapstein $i
  23.        done
  24.  
  25. #decoder
  26.        for i in *.ima ; do
  27.                cat $i | decode-g72x -64 -l -L | sox -r 8000 -2 -c 1 -s -t raw - -t wav $i.wav;
  28.        done
  29.  
  30. #mixer by burgiman
  31. #       makes a new file with mixed fp & pp
  32.        for i in `/bin/ls -1 *_fp.ima.wav` ; do
  33.                dumpCL=${i%.pcap_fp.ima.wav}
  34.                dumpFP=$dumpCL'.pcap_fp.ima.wav'
  35.                dumpPP=$dumpCL'.pcap_pp.ima.wav'
  36.  
  37.                if [ -f $dumpPP ]
  38.                then
  39.                        echo "== FP & PP found for =="
  40.                        echo "   $dumpCL"
  41.                        echo "   FP: $dumpFP"
  42.                        echo "   PP: $dumpPP"
  43.                        sox -m $dumpFP $dumpFP call-$dumpCL.wav
  44.                fi
  45.        done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement