LoginSignup
17
12

More than 5 years have passed since last update.

テスト用のmp3ファイルをsayコマンドを使って作成する

Last updated at Posted at 2016-01-18

音声再生系のサービスのテストでmp3のダミーデータが欲しい時にMacユーザーならsayコマンドを使って簡単に用意できます。

terminalを開いてまずはhomebrewをインストール
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

homebrewのインストールが終わったらffmpegをインストール
brew install ffmpeg

sayコマンドで「こんにちは」と喋らせ、それを.aiffとして書き出し
say -v Kyoko こんにちは -o first.aiff

ffmpegを使ってaiffをmp3ファイルに変換
ffmpeg -i first.aiff hello.mp3

参考
Macのsayコマンドの使い方
ffmpegの使い方

17
12
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
17
12