From: Romaric P. <ro...@sa...> - 2012-01-31 13:12:25
|
Ok it works with your solution Romaric Le 30 janv. 2012 à 20:09, David Baelde <dav...@en...> a écrit : > Wow, this sucks. It lets you set the number of channels but then > expects that it is the same as the type. Bad design: either we let you > pick the number of channels and the type (difficult in this > situation), or allow to de-correlate the two (introduces an implicit > conversion, not very controllable), or read the number of channels > from the type (seems best)! > > For now, here's the workaround: you have a problem because your > source's type is (*+1,0,0) meaning that it can produce a variable > output, so you need to force this type to the (seemingly) more > restrictive mono type. > > my_src = audio_to_stereo((input.external(id="voice", > restart=false, buffer=0.0, channels=1, samplerate=44100, > "sox /tmp/audio.wav -c 1 -r 44100 -t raw -"):source(1,0,0))) > > All the best, > -- > David > > PS: I'll open a ticket or add this to an existing one. |