def core_process(self, command, buffer_size, dest):
"""Encode and stream audio data through a generator"""
-
+
__chunk = 0
file_out = open(dest,'w')
- try:
- proc = subprocess.Popen(command,
+ proc = subprocess.Popen(command.encode('utf-8'),
shell = True,
bufsize = buffer_size,
stdin = subprocess.PIPE,
stdout = subprocess.PIPE,
close_fds = True)
- except:
- raise ExportProcessError('Command failure:', command, proc)
# Core processing
while True:
self.args = self.get_args(options)
self.ext = self.get_file_extension()
self.args = ' '.join(self.args)
- self.command = 'sox "%s" -s -q -b 16 -r 44100 -t wav -c2 - | lame %s -' % (self.source, self.args)
+ self.command = 'sox "%s" -q -b 16 -r 44100 -t wav - | lame %s -' % (self.source, self.args)
#self.command = 'lame %s "%s" -' % (self.args, self.source)
-
+
# Pre-proccessing
self.dest = self.pre_process(self.item_id,
self.source,