OpenJTalk.Wav (open_jtalk_elixir v0.3.0)
View SourceMinimal WAV utilities: parse and concatenate WAVs that share the same format.
Supported formats:
- PCM (audio_format = 1)
- IEEE float (audio_format = 3)
Notes:
- All inputs must have identical:
audio_format,channels,sample_rate,bits_per_sample,block_align,byte_rate, and any format-extra bytes. - This module ignores non-essential chunks (e.g.,
LIST,cue). The output contains a canonicalfmt(format) anddataonly, sized correctly for the combined audio.
Summary
Functions
Concatenate multiple WAV binaries into a single valid WAV.
Read and concatenate multiple WAV files indicated by paths.
Types
@type format() :: %{ audio_format: 1 | 3, channels: pos_integer(), sample_rate: pos_integer(), byte_rate: pos_integer(), block_align: pos_integer(), bits_per_sample: pos_integer(), extra: binary() }
Parsed fmt (format) information.
Functions
Concatenate multiple WAV binaries into a single valid WAV.
All inputs must have the same format parameters (PCM/float, channels, rate, etc.).
Returns {:ok, binary} or {:error, reason}.
Read and concatenate multiple WAV files indicated by paths.
Returns {:ok, binary} or {:error, {:file_read_failed, path, reason}}.