--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: capisuite: Should send mp3 instead of wav
- From: Hadmut Danisch <hadmut@danisch.de>
- Date: Tue, 16 Aug 2005 20:19:37 +0200
- Message-id: <20050816181937.B68CE212B6@andromeda.dresden.danisch.de>
Package: capisuite
Version: 0.4.5-3
Severity: normal
Hi,
when receiving a phone call, capisuite sends a .wav file, which
is waste of space/bandwidth and not understood by all clients.
It would be better to send mp3.
I have replaced the part of cs_helpers.py which does the job:
ret = os.spawnlp(os.P_WAIT,"sox","sox",attachment,"-r","16000","-w",basename+"wav")
if (ret or not os.access(basename+"wav",os.R_OK)):
raise "conv-error","Error while calling sox. Not installed?"
ret = os.spawnlp(os.P_WAIT,"lame","lame",basename+"wav",basename+"mp3")
if (ret or not os.access(basename+"mp3",os.R_OK)):
raise "conv-error","Error while calling lame. Not installed?"
filepart = email.MIMEAudio.MIMEAudio(open(basename+"mp3").read(),"x-mp3",email.Encoders.encode_base64,name=os.path.basename(basename)+"mp3")
filepart.add_header('Content-Disposition','attachment',filename=os.path.basename(basename)+"mp3")
os.unlink(basename+"wav")
os.unlink(basename+"mp3")
Someone more familiar with python should include a check whether lame is
present.
regards
Hadmut
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.11-danisch-p4-intel
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Versions of packages capisuite depends on:
ii gs-afpl [gs] 8.14-3 The AFPL Ghostscript PostScript in
ii gs-esp [gs] 7.07.1-9 The Ghostscript PostScript interpr
ii libc6 2.3.5-3 GNU C Library: Shared libraries an
ii libgcc1 1:4.0.1-2 GCC support library
ii libstdc++5 1:3.3.6-7 The GNU Standard C++ Library v3
ii libtiff-tools 3.7.3-1 TIFF manipulation and conversion t
ii postfix [mail-transport-agent 2.2.4-1 A high-performance mail transport
ii python 2.3.4-4 An interactive high-level object-o
ii python2.3 2.3.5-6 An interactive high-level object-o
ii sfftobmp 3.0-1 SFF (Structed Fax File) Converter
ii sox 12.17.5-4 A universal sound sample translato
-- no debconf information
--- End Message ---