Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_output_format can not change the encoding type. #144

Open
raraz15 opened this issue Aug 26, 2021 · 0 comments
Open

set_output_format can not change the encoding type. #144

raraz15 opened this issue Aug 26, 2021 · 0 comments

Comments

@raraz15
Copy link

raraz15 commented Aug 26, 2021

I create a transformer object, read a wav file with it, and try to change the sample rate and the encoding type with the following block of code.

tfm = sox.Transformer()

array_in = tfm.build_array(input_filepath=wav_path)

tfm.set_output_format(rate=SAMPLE_RATE_OUT, encoding='floating-point')

array_out = tfm.build_array(input_array=array_in, sample_rate_in=SAMPLE_RATE_IN)

The problem is that the output array is still in PCM and is not converted to floating-point, as specified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant