コード例 #1
0
 def qcpfinal(self, start, duration, volume=None):
     conversions.converttowav(self.file, self.wavfile, samplerate=8000, channels=1, start=start, duration=duration)
     if volume is not None:
         conversions.adjustwavfilevolume(self.wavfile, volume)
     conversions.convertwavtoqcp(self.wavfile, self.qcpfile,
                                 self.optimization.GetSelection())
     return open(self.qcpfile, "rb").read()
コード例 #2
0
ファイル: ringers.py プロジェクト: deosai/bitpim
 def qcpfinal(self, start, duration, volume=None):
     # use the original to make a new wav, not the one that went through foo -> qcp -> wav
     conversions.converttowav(self.file, self.wavfile, samplerate=8000, channels=1, start=start, duration=duration)
     if volume is not None:
         conversions.adjustwavfilevolume(self.wavfile, volume)
     conversions.convertwavtoqcp(self.wavfile, self.qcpfile,
                                 self.optimization.GetSelection())
     return file(self.qcpfile, "rb").read()
コード例 #3
0
ファイル: ringers.py プロジェクト: SJLC/portage-overlay
 def qcpfinal(self, start, duration, volume=None):
     # use the original to make a new wav, not the one that went through foo -> qcp -> wav
     conversions.converttowav(self.file, self.wavfile, samplerate=8000, channels=1, start=start, duration=duration)
     if volume is not None:
         conversions.adjustwavfilevolume(self.wavfile, volume)
     conversions.convertwavtoqcp(self.wavfile, self.qcpfile,
                                 self.optimization.GetSelection())
     return file(self.qcpfile, "rb").read()
コード例 #4
0
ファイル: ringers.py プロジェクト: deosai/bitpim
 def qcpconvert(self):
     # we verify the pvconv binary exists first
     conversions.getpvconvbinary()
     # convert to wav first
     conversions.converttowav(self.file, self.wavfile, samplerate=8000, channels=1)
     # then to qcp
     conversions.convertwavtoqcp(self.wavfile, self.qcpfile,
                                 self.optimization.GetSelection())
     # and finally the wav from the qcp so we can accurately hear what it sounds like
     conversions.convertqcptowav(self.qcpfile, self.wavfile)
コード例 #5
0
ファイル: ringers.py プロジェクト: SJLC/portage-overlay
 def qcpconvert(self):
     # we verify the pvconv binary exists first
     conversions.getpvconvbinary()
     # convert to wav first
     conversions.converttowav(self.file, self.wavfile, samplerate=8000, channels=1)
     # then to qcp
     conversions.convertwavtoqcp(self.wavfile, self.qcpfile,
                                 self.optimization.GetSelection())
     # and finally the wav from the qcp so we can accurately hear what it sounds like
     conversions.convertqcptowav(self.qcpfile, self.wavfile)
コード例 #6
0
 def qcpconvert(self):
     conversions.getpvconvbinary()
     conversions.converttowav(self.file, self.wavfile, samplerate=8000, channels=1)
     conversions.convertwavtoqcp(self.wavfile, self.qcpfile,
                                 self.optimization.GetSelection())
     conversions.convertqcptowav(self.qcpfile, self.wavfile)