Re: Segmentation fault transcoding mp3 to wav using pysox

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think (looking at the source code) that my problem was that I'd confused effects with filters. I've now worked out how to do what I want with the pymad library (based on libmad) instead.

Pete Bleackley
The Fantastical Devices of Pete The Mad Scientist - http://fantasticaldevices.blogspot.com

-----Original Message-----
From: Eric Wong <normalperson@xxxxxxxx>
To: sox-users@xxxxxxxxxxxxxxxxxxxxx
Sent: Sat, 05 Nov 2016 22:14
Subject: Re:  Segmentation fault transcoding mp3 to wav using pysox

Hi Pete, can you show us a backtrace from gdb?

You might need to enable debug symbols and leave binaries
unstripped.

Perhaps loop the pysox authors into this, I'm not familiar with
pysox (or python) and don't expect most folks here to be,
either.

Thanks

pete.bleackley@xxxxxxxxxxxxxx wrote:
> I've added some diagnostics, and found that the segmentation fault occurs at
> .
>   sox.add_effect(pysox.CEffect('bits',['16']))
> 
> Pete Bleackley
> The Fantastical Devices of Pete The Mad Scientist - http://fantasticaldevices.blogspot.com
> 
> -----Original Message-----
> From: PETER BLEACKLEY <pete.bleackley@xxxxxxxxxxxxxx>
> To: sox-users@xxxxxxxxxxxxxxxxxxxxx
> Sent: Thu, 03 Nov 2016 16:16
> Subject:  Segmentation fault transcoding mp3 to wav using pysox
> 
> I'm trying to transcribe a podcast. To do this, I'm streaming mp3 from the web, and transcoding it to wav with pysox before piping the transcoded audio to the speech recognition component. My sox installation is the latest version, built from source on AWS, and with the LAME and Wavpack libraries included (also built from source).
> The relevant code is
>             (to_adapter,from_sox)=multiprocessing.Pipe()
>             sox_output=pysox.SocketOutput('output',[from_sox])
>             mp3=mp3Downloader(audio_url)
>             sox=pysox.CEffectsChain(istream=mp3.stream)
>             sox.add_effect(pysox.CEffect('channels',['1']))
>             sox.add_effect(pysox.CEffect('rate',['16k']))
>             sox.add_effect(pysox.CEffect('bits',['16']))
>             sox.add_effect(pysox.CEffect('type',['wav']))
>             sox.add_effect(sox_output)
> class mp3Downloader(multiprocessing.Process,object):
>     """Downloads an mp3 file and sends it through a pipe"""
>     def __init__(self,audio_url):
>         """Sets up the pipe"""
>         super(mp3Downloader,self).__init__()
>         self.from_web,to_stream=multiprocessing.Pipe()
>         self.stream=pysox.CPysoxPipeStream(path=to_stream)
>         self.audio_url=audio_url
>     def run(self):
>         """Downloads the audio and feeds it to the pipe"""
>         audio=requests.get(self.audio_url,stream=True)
>         for block in audio.iter_content(1024):
>             self.from_web.send(block)
> This produces a segmentation fault. What can I do to remedy this?
> Pete Bleackley
> 
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> _______________________________________________
> Sox-users mailing list
> Sox-users@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux