0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Asterisk slin(Signed-LINear)フォーマットを新しいSoXで変換する手順

Posted at

Asterisk slin(Signed-LINear)フォーマットを新しいSoXで変換する手順

Asteriskで使用するslinフォーマットの音声ファイルを変換する手順は
voip-info.org で公開されているドキュメントにありますが、使用しているSoXのバージョンが古く、sox-14.4.0以降のバージョンでは変換できないため、新しいバージョンに対応した変換手順のメモを残しておきます。

WAV to slin

(short form)
$ sox test.wav -t raw -r 8000 -c 1 test.slin
(long form)
$ sox test.wav --type raw --rate 8000 --channels 1 test.slin

$ file test.slin
test.slin: data

slin to WAV

(short form)
$ sox -t raw -r 8000 -c 1 -b 16 -e signed-integer test.slin -t wav test2.wav
(long form)
$ sox --type raw --rate 8000 --channels 1 --bits 16 --encoding signed-integer test.slin \
    --type wav test2.wav

$ file test2.wav
test2.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz

参考資料

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?