diff --git a/pi/asound.conf b/pi/asound.conf new file mode 100644 index 00000000..5cb01c17 --- /dev/null +++ b/pi/asound.conf @@ -0,0 +1,37 @@ +# Use the Google Voice HAT soundcard as index 0 (primary card) +options snd_rpi_googlevoicehat_soundcard index=0 + +# Define a soft volume control for the speaker (Playback) +pcm.softvol { + type softvol + slave.pcm "dmix" # route through dmix for mixing + control { + name "Master" # name of volume control + card 0 + } +} + +# Define a software volume (gain) for the microphone (Capture) +pcm.micboost { + type softvol + slave.pcm "dsnoop" # route through dsnoop for sharing + control { + name "Micro" # name of mic gain control + card 0 + } + min_dB -10.0 + max_dB 50.0 + resolution 256 +} + +# Set default devices to use the above for asymmetrical playback/capture +pcm.!default { + type asym + playback.pcm "plug:softvol" + capture.pcm "plug:micboost" +} + +ctl.!default { + type hw + card 0 +} diff --git a/plans/audio_on_roomba_outline.md b/plans/audio_on_roomba_outline.md new file mode 100644 index 00000000..1b651365 --- /dev/null +++ b/plans/audio_on_roomba_outline.md @@ -0,0 +1,27 @@ +# general idea +- the pi on each roomba will have a speaker and microphone +- alsa devices + - they are both the default audio device +- you will have to modify roverd, the pi install script, and the server to get this all to work + +# adding stuff to installation script +- I am using the google voice AIY v1 kits for audio +- boot config stuff + - enable `dtoverlay=googlevoicehat-soundcard` + - disable `dtparam=audio=on` +- copy asound.conf in pi folder to /etc/asound.conf + +# microphone +- add microphone to the SRT publish stream + +# speaker +- user's chat messages will be TTS'ed through the speaker on the pi + - either flite with a way to choose the voice + - or espeak where you can choose the pitch +- on the web UI and in the chat API + - add new stuff to chat + - only shows up if you are on a rover + - only shows up if TTS is enabled on that rover + - people can choose between flite or espeak + - if they choose flite, they can choose the voice from the default flite voices (exclude awb and awb_time) + - if they choose espeak, they can choose the pitch. Have a dropdown with increments of 10 from 0 to 99 \ No newline at end of file