aquestalkpi で、文字を読ませるテスト
aquestalkpi
AquesTalk Pi - Raspberry Pi用の音声合成
で、任意の文字を読み上げるまで。
ヘッドセットの動作確認
手元に有ったバッファロー製のUSBヘッドセットをさしてみた。
# lsusb Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. Bus 001 Device 008: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller Bus 001 Device 005: ID 0461:4d81 Primax Electronics, Ltd Bus 001 Device 006: ID 413c:2107 Dell Computer Corp.
と、認識されている。
# aplay -l **** ハードウェアデバイス PLAYBACK のリスト **** カード 0: Device [USB PnP Sound Device], デバイス 0: USB Audio [USB Audio] サブデバイス: 1/1 サブデバイス #0: subdevice #0 カード 1: ALSA [bcm2835 ALSA], デバイス 0: bcm2835 ALSA [bcm2835 ALSA] サブデバイス: 8/8 サブデバイス #0: subdevice #0 サブデバイス #1: subdevice #1 サブデバイス #2: subdevice #2 サブデバイス #3: subdevice #3 サブデバイス #4: subdevice #4 サブデバイス #5: subdevice #5 サブデバイス #6: subdevice #6 サブデバイス #7: subdevice #7 カード 1: ALSA [bcm2835 ALSA], デバイス 1: bcm2835 ALSA [bcm2835 IEC958/HDMI] サブデバイス: 1/1 サブデバイス #0: subdevice #0
使用するデバイスの優先順位を指定する。
/etc/modprobe.d/alsa-base.conf
で、 options snd-usb-audio index=0
にしてあげる。
さっそく、サンプル音声を再生してみる。
# aplay -D hw:0,0 /usr/share/sounds/alsa/Front_Center.wav 再生中 WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, レート 48000 Hz, モノラル aplay: set_params:1087: チャネル数が使用不可能
と、エラーがでる。
調べきれていないが、モノラルがどうのこうの???
-D のオプションを変更する。
# aplay -D plughw:0,0 /usr/share/sounds/alsa/Front_Center.wav 再生中 WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, レート 48000 Hz, モノラル
無事に再生できる。
次に、棒読みちゃんとは関係ないが、マイクのテストも行う
~# arecord -D plughw:0,0 -d 2 -f cd test.wav 録音中 WAVE 'test.wav' : Signed 16 bit Little Endian, レート 44100 Hz, ステレオ
正しく録音されたか確認する
# aplay test.wav 再生中 WAVE 'test.wav' : Signed 16 bit Little Endian, レート 44100 Hz, ステレオ
棒読みちゃんのインストール
http://www.a-quest.com/products/aquestalkpi.html
から、ダウンロードする。
# tar zxvf aquestalkpi-20130827.tgz
などして、解凍して設置する。
動作確認する。
# /usr/local/etc/aquestalkpi/AquesTalkPi -g 10 こんにちは | aplay -D plughw:0,0 再生中 WAVE 'stdin' : Signed 16 bit Little Endian, レート 8000 Hz, モノラル
# date +"%I時%M分%S秒" | /usr/local/etc/aquestalkpi/AquesTalkPi -g 5 -f -| aplay -D plughw:0,0 再生中 WAVE 'stdin' : Signed 16 bit Little Endian, レート 8000 Hz, モノラル