You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
i'm trying to do thing right for my combiner and fill all the value in my set.input.format with data from the file itself
I know the data is implicitly fed if set to NONE, but i still wanted to do it.
The issue i am having is that sox.file_info.encoding("/some/path/to/file.wav") return a string like 'Signed Integer PCM', witch can't be used as an argument for my sox.combiner().set_input_format(encoding = ##) who expect signed-integer
So, i have looked a bit around without finding something who do the conversion/give me a value i can just put in, and before doing an ugly switch case list of elif, i was wondering if i missed anything.
Thank's for the time and work, this wrapper saved my butt ^^'
The text was updated successfully, but these errors were encountered:
poofyteddy
changed the title
Question: Easy way to convert file_info.encoding into encdoing input format ?
Question: Easy way to convert file_info.encoding into encoding input format ?
Nov 20, 2018
Hi @poofyteddy . I suspect you're wanting to set the input format because of the annoying warning sox is putting (see #85 )?
The short answer to your question is, no there isn't an easy way to convert between the output of file_info.encoding to the expected input format of Combiner.set_input_format. I haven't had a use case for this functionality before (since sox is internally doing what you propose), but if you have one I'm happy to look at a pull request!
This was in did my start point, after seeing that you could specified the files informations, i thought that it was a better/proper way to do it anyway. I don't have a real need for it, it only "feel" better than letting it figure it out (event if in the end i ask him the data to give back....)
If there is nothing in place, it's ok. But i don't have a real usecase, and feel like adding a "switch case" method to convert one type of data to the other would be ok for a script, not for the library (being only a wrapper, sox could change there output.)
Hello,
i'm trying to do thing right for my combiner and fill all the value in my set.input.format with data from the file itself
I know the data is implicitly fed if set to NONE, but i still wanted to do it.
The issue i am having is that
sox.file_info.encoding("/some/path/to/file.wav")
return a string like'Signed Integer PCM'
, witch can't be used as an argument for my sox.combiner().set_input_format(encoding = ##)
who expectsigned-integer
So, i have looked a bit around without finding something who do the conversion/give me a value i can just put in, and before doing an ugly
switch caselist of elif, i was wondering if i missed anything.Thank's for the time and work, this wrapper saved my butt ^^'
The text was updated successfully, but these errors were encountered: