set_output_format can not change the encoding type.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 540
- Forks
- 83
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the example through Transformer.set_output_format and build_array, checking how the requested encoding is carried from the transformer to the output array. Done means that setting encoding='floating-point' produces a floating-point output array while still applying the requested sample-rate conversion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100