rhasspy / wyoming-satellite

Remote voice satellite using Wyoming protocol
MIT License
613 stars 91 forks source link

[Feature request] Record Audio for debugging #163

Open kunalgrover05 opened 4 months ago

kunalgrover05 commented 4 months ago

First of all, I think the tooling has greatly advanced from good old Rhasspy days, awesome job!

I am using a PS3 Eye for Wyoming satellite from my old Rhasspy setup and have been struggling to tune Volume gain / Noise suppression parameters due to lack of any feedback loop from various setup parameter changes.

A way to capture and store audio from the microphone would allow to optimise ways to get the best results. PS: If others are already using PS3 Eye, please do share the best parameters from your setup. There was this old setup thread with pulseaudio which worked pretty well for Rhasspy, but haven't tried with the new setup: https://community.rhasspy.org/t/ps3-eye-users-show-your-configuration/888/2

tannisroot commented 4 months ago

See https://www.home-assistant.io/voice_control/troubleshooting/#to-tweak-the-assist-audio-configuration-for-your-device

tannisroot commented 4 months ago

Although I would change path from /share/assist_pipeline to /config/assist_pipeline so you don't have to switch between folders in the file editors to view audio.

tannisroot commented 4 months ago

And ignore the adjustment of audio processing in YAML, i think this is not needed anymore and can be done through GUI entirely.

donburch888 commented 4 months ago

@tannisroot It looks to me that the audio troubleshooting advice you linked to is specific for ESP devices, such as the S32-S3-BOX-3 ... and is not relevant for wyoming-satellite which runs on linux devices, such as Raspberry Pi.

@kunalgrover05 I think you are after the “–debug-recording-dir” option for the wyoming-satellite script/run. It saves both the wake.wav and stt.wav files into the directory you specify, so you can listen to them with aplay.

tannisroot commented 4 months ago

@tannisroot It looks to me that the audio troubleshooting advice you linked to is specific for ESP devices, such as the S32-S3-BOX-3 ... and is not relevant for wyoming-satellite which runs on linux devices, such as Raspberry Pi.

@kunalgrover05 I think you are after the “–debug-recording-dir” option for the wyoming-satellite script/run. It saves both the wake.wav and stt.wav files into the directory you specify, so you can listen to them with aplay.

The section I linked is not speciric to ESP devices and does save output from Assist pipeline onto the server.

donburch888 commented 3 months ago

The section I linked is not speciric to ESP devices

Ahhh, yes ... actually installing ESPHome (steps 1-4) and editing the ESPHome configuration file (steps 10-11) are specific to ESPHome. They certainly are not relevant for Wyoming-satellite running on a Raspberry Pi, which is the title of this thread. I had assumed that the other YAML code was to go in the ESPHome device configurations, but on closer inspection I see that steps 6-9 (which should be the focus of the instructions) briefly indicate that recordings are available on the HA server.

Although I would change path from /share/assist_pipeline to /config/assist_pipeline so you don't have to switch between folders in the file editors to view audio.

Personally I use the HA Samba share add-on, which already exposes the /share folder ... so it's fairly simple in my PCs file manager to open smb://homeassistant.local/share and play the .wav files.

I am pleased to note that with wyoming-satellite there are two methods for saving the .wav files and listening to the recorded audio:

I forked the troubleshooting documentation page to update it, but realised that (a) there are other Voice Assist approaches (such as VOIP and adding a mic directly to the HA server) which I am not familiar with, so cannot incorporate; and (b) that HAs documentation is not intended at the detailed tutorial level - probably because they would become so involved that they would confuse users more.

Rather than create one set of instructions to cover all possibilities, it will be better to create separate Community Guides for the different approaches ... and so I will write one for tweaking audio for voice assist for satellites using wyoming-satellite.