// soxインストール $ brew install sox // 音声録音 $ rec --encoding signed-integer --bits 16 --channels 1 --rate 16000 <出力ファイル名(test.wav)> // flac形式に変換(flac形式のファイルが作られる(test.flac)) $ flac -V <変換するファイル(test.wav)> // google speech APIで音声認識 $ curl -X POST \ --data-binary @'<ファイル名>' \ --header 'Content-Type: audio/x-flac; rate=16000;' \ 'https://www.google.com/speech-api/v2/recognize?output=json&lang=ja-JP&key=<