macOSのsayコマンドでwavファイルを保存したい
wavファイルへの保存:say -o hi.wav --data-format=LEF32@22050 "hello"
--data-format=format(man sayより)
The format of the audio data to be stored.
Formats other than linear PCM are specified by giving their format identifiers (aac, alac). Linear PCM formats are specified as a sequence of:
Endianness (optional)
One of BE (big endian) or LE (little endian). Default is native endianness.
上の例ではLE
Data type
One of F (float), I (integer), or, rarely, UI (unsigned integer).
上の例ではF
Sample size
One of 8, 16, 24, 32, 64.
上の例では32
Most available file formats only support a subset of these sample formats.
To obtain a list of audio data formats for a file format specified explicitly or by file name, specify '?' as the format name.
The format identifier optionally can be followed by @samplerate and /hexflags for the format.
上の例では22050
これを16000に変える!( #ESPnet のモデルはsample rate 16000で学習しているため)