Skip to content

Commit

Permalink
Note that the format can be autodetected (#545)
Browse files Browse the repository at this point in the history
The format for `from_file` doesn't actually default to MP3. See here:

https://github.com/jiaaro/pydub/blob/23779fdb186fe66e4252e61062f36c1ffa229bb9/pydub/audio_segment.py#L659-L666

This updates the documentation to reflect that.

Co-authored-by: James Robert <github@jiaaro.com>
  • Loading branch information
interfect and jiaaro committed Mar 6, 2021
1 parent 8b9bd24 commit 9722bec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion API.markdown
Expand Up @@ -91,7 +91,7 @@ The first argument is the path (as a string) of the file to read, **or** a file

**Supported keyword arguments**:

- `format` | example: `"aif"` | default: `"mp3"`
- `format` | example: `"aif"` | default: autodetected
Format of the output file. Supports `"wav"` and `"raw"` natively, requires ffmpeg for all other formats. `"raw"` files require 3 additional keyword arguments, `sample_width`, `frame_rate`, and `channels`, denoted below with: **`raw` only**. This extra info is required because raw audio files do not have headers to include this info in the file itself like wav files do.
- `sample_width` | example: `2`
**`raw` only** — Use `1` for 8-bit audio `2` for 16-bit (CD quality) and `4` for 32-bit. It’s the number of bytes per sample.
Expand Down

0 comments on commit 9722bec

Please sign in to comment.