LoginSignup
3
2

More than 3 years have passed since last update.

Windows10:コマンドラインから録音する方法(SoX)

Posted at

コマンドラインから録音したかった

  • 引数でファイル名を指定したかった
  • wav形式で保存したかった
  • よくわからんVectorアプリは入れたくなかった(偏見)

SoX(Sound eXchange)をインストールする

結論

録音開始

  • 以下のコマンドで録音できた。
sox -t waveaudio default -b 16 -c 1 -e signed-integer -r 16000 --endian little -t wav - > output.wav
-t ファイルの形式(wav | mp3 | row 等)
-b 量子化ビット数 ( 8 | 16 )
-c  チャネル数 (1 | 2) 
-e  標本符号化(signed-integer | unsigned-integer)
-r  標本化周波数 (8000 | 16000 | 48000 等)
-- endian エンディアン (little | big )
- 標準出力

録音終了

  • Ctrl+C で録音が終了する

余談

Windows10標準のWindowsアプリ版ボイスレコーダーは、コマンドラインから次のコマンドで起動することができる。

explorer.exe shell:appsFolder\Microsoft.WindowsSoundRecorder_8wekyb3d8bbwe!App
3
2
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
3
2