Voicemail / intercom via Mastodon #447
Replies: 1 comment
-
Sending messages was essentially web based and didn't use the Nabaztag's microphone, this was a different feature. A first step towards what you describe can be a messaging feature over Mastodon with pre-recorded sounds. This also requires setting up a voicemail, i.e. a list of messages that can be seen from a web interface and can be replayed by pressing the button. This is what #24 is about. Regarding what you describe (recording a sound from one rabbit and playing it on another one), the question is how the feature should be triggered. If the feature can be trigged by say a RFID tag, an ASR voice command or from the website, then you can write an application that will set the nabaztag in interactive mode in which the ASR is effectively disabled and the button can be used as you please. In such a scenario, it would easy to extend the interactive mode to effectively allow a The other thing to be aware of is that the microphone is of poor quality and the sound will not be so great, especially with the RFID and LEDs that generate noise. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I started looking into implementing the voicemail / intercom feature where you can record a message and have it played back by the spouse/paired rabbit. The general idea would be to have a new type of Mastodon message that would embed a media: the recorded message in mp3.
One challenge is that currently button holding and recording is hard-coded to trigger the automatic speech recognition (ASR). I'm not sure how best to change this.
Ideally I was thinking a new boolean field on the nabmastodond config to enable/disable the intercom. If enabled then the ASR should be disabled, but it doesn't feel right for nabd (where the ASR lives) to access the nabmastodond config?
Alternatively the recording action could be generic and trigger a new type of packet
recording_event
which can then be handled by the services. There would be the need for a global config flag that enables or disable ASR. If enabled, keep the current behavior. If disabled, dispatch the recording in an event which in this case will be handled by nabmastodond. But I feel that might not be easy to "explain" in the web interface (e.g. a toggle setting between "Enable ASR" or "Disable ASR and send audio to the services" would be confusing).Also not too sure how to pass down the audio content down to the services. I saw that the audio used to be stored in a file
sound_alsa_recording.raw
but currently it only happens if the logging level is DEBUG. One option would be to always write to the file, and each service could read that file. However that would be problematic if 2 recordings are made in quick succession as the second one will overwrite the first one while it's being processed... So another option would be a new file for each event, with a timestamp in the name for example, and the event would contain the filename. There would be the need for a cleanup task though.I would be glad to get input on this and how best to approach / design it? I saw there was an issue #24 about this, maybe @pguyot had an implementation design in mind?
Also I don't really know Python and the async code makes it quite complicated for me to follow, so I'm not sure how far I can get. Still, I will make an attempt!
Beta Was this translation helpful? Give feedback.
All reactions