File capisuite-0.5.cvs.sox.diff of Package faxgate
diff -U 3 -H -d -r -N -- capisuite-0.5.cvs/scripts/cs_helpers.pyin capisuite-0.5.cvs_sox/scripts/cs_helpers.pyin --- capisuite-0.5.cvs/scripts/cs_helpers.pyin 2008-11-24 19:17:22.000000000 +0100 +++ capisuite-0.5.cvs_sox/scripts/cs_helpers.pyin 2012-08-28 21:22:27.430647294 +0200 @@ -253,7 +253,7 @@ elif (mail_type=="la"): # voice file # la -> wav # don't use stdout as sox needs a file to be able to seek in it otherwise the header will be incomplete - ret = os.spawnlp(os.P_WAIT,"sox","sox",attachment,"-w",basename+"wav") + ret = os.spawnlp(os.P_WAIT,"sox","sox","-r","8000","-c","1",attachment,basename+"wav") if (ret or not os.access(basename+"wav",os.R_OK)): raise "conv-error","Error while calling sox. File damaged or sox not installed?" filepart = email.MIMEAudio.MIMEAudio(open(basename+"wav").read(),"x-wav",email.Encoders.encode_base64,name=os.path.basename(basename)+"wav")