Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No sound when timer finished #189

Open
faduchesne opened this issue Jun 30, 2024 · 6 comments
Open

No sound when timer finished #189

faduchesne opened this issue Jun 30, 2024 · 6 comments

Comments

@faduchesne
Copy link

To Install my Wyoming satellite on my Raspberry 3 I use the tutorial_installer.md.
I don't know where I can select to have a sound when my timer is finished ?
thx for your help

@TN-1
Copy link

TN-1 commented Jun 30, 2024

~/wyoming-satellite/script/run --help
  --timer-finished-wav TIMER_FINISHED_WAV
                        WAV file to play when a timer finishes
  --timer-finished-wav-repeat repeat delay
                        Number of times to play timer finished WAV and delay between repeats in seconds

Edit your service file or run command to include the above argument/s

@faduchesne
Copy link
Author

I've edited my service file like this but no sound at the end of the timer...

[Service]
Type=simple
User=faduchesne
Environment=XDG_RUNTIME_DIR=/run/user/1000
ExecStart=/home/faduchesne/wyoming-satellite/script/run
--name 'Satellite Salon'
--uri tcp://0.0.0.0:10700 \
--mic-command 'arecord -D plughw:CARD=USB,DEV=0 -q -r 16000 -c 1 -f S16_LE -t raw' \
--snd-command 'aplay -D plughw:CARD=USB,DEV=0 -q -r 22050 -c 1 -f S16_LE -t raw' \
--awake-wav sounds/awake.wav \
--done-wav sounds/done.wav \
--timer-finished-wav sounds/timer_finished.wav \
--timer-finished-wav-repeat 4 1 \
--mic-noise-suppression 2 \
--mic-auto-gain 15 \
--wake-uri tcp://127.0.0.1:10400 \
--wake-word-name tournesol
WorkingDirectory=/home/faduchesne/wyoming-satellite
Restart=always
RestartSec=1

@faduchesne faduchesne changed the title timer finished No sound when timer finished Jul 3, 2024
@TN-1
Copy link

TN-1 commented Jul 7, 2024

Try using a full path instead of relative, eg /home/faduchesne/wyoming-satellite/sounds/awake.wav or whatever applies for your setup.

@CBDesignS
Copy link

CBDesignS commented Jul 29, 2024

-- edited once I found my problem --

I found my problem and maybe some others.

while searching for info about the timer I found a site with said info and I copied & pasted the settings and gave it a whirl.

--timer-finished-wav 'sounds/timer_finished.wav' \
--timer-finished-wav-repeat 3 5

the timer finished.wav never played and I joined the list of "this does not play fanboys".
While sitting looking at the code I noticed it had a pair of ' ' marks around the name. (thats what I get for copying and pasting others code I suppose)
once they were removed the timer_finished.wav now plays when the timer is complete.

my timer line now looks like this:-

--timer-finished-wav sounds/timer_finished.wav \
--timer-finished-wav-repeat 3 5

does anyone know the audio format of the wav samples ?? looking at them in Audacity they show as Microsoft wav 22050Hz Mono 32bit float.
I tried to replace the files with my own saved in the same format but they refuse to play so they must be a specific format for this.

reading the destructions again , testing the record fuction it uses "arecord -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t wav -d 5 test.wav" so maybe the sample rate is 16000 not 22050 that Audacity found.

Any ideas or do I need to keep testing or maybe use the satellit to record them with the above code ?

@andzejsp
Copy link

im having the same issue, no awake/timer/done sound is playing. Tried absolute path and local path, no bueno :(.. i really need this

@CBDesignS
Copy link

If the awake.wav & done.wav both play from the default sounds/awake.wav & sounds/done.wav folder then the path to the sound files is working and the sounds/timer_finished.wav should work unless you tried to use your own timer_finished.wav file.
Have you split the long command up into small parts with a trailing \ after each command ? it could be a hidden extra space after the \ that you can not see . it could be a missing \ or the last command may have a \ when it should not have one, python syntax like most code is very very picky, any problems and it just will not work, wrong indents, missing quotes and even spaces.

here is part of my current working code from wyoming-satellite.service that works perfectly

--uri 'tcp://0.0.0.0:10700' \
--mic-command 'arecord -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw' \
--snd-command 'aplay -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw' \
--snd-command-rate 16000 \
--snd-volume-multiplier 0.5 \
--mic-auto-gain 1 \
--mic-noise-suppression 2 \
--vad-threshold 0.5 \
--wake-uri 'tcp://127.0.0.1:10400' \
--wake-word-name 'hey_jarvis' \
--event-uri 'tcp://127.0.0.1:10500' \
--awake-wav sounds/awake.wav \
--done-wav sounds/done.wav \
--timer-finished-wav sounds/timer_finished.wav \
--timer-finished-wav-repeat 10 2

the next code below is the same code from above that does not work because there is a space after the \ on the sounds/done.wav \ line, you can not see it with the naked eye but it is there and it will ruin the syntax of the command

--uri 'tcp://0.0.0.0:10700' \
--mic-command 'arecord -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw' \
--snd-command 'aplay -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw' \
--snd-command-rate 16000 \
--snd-volume-multiplier 0.5 \
--mic-auto-gain 1 \
--mic-noise-suppression 2 \
--vad-threshold 0.5 \
--wake-uri 'tcp://127.0.0.1:10400' \
--wake-word-name 'hey_jarvis' \
--event-uri 'tcp://127.0.0.1:10500' \
--awake-wav sounds/awake.wav \
--done-wav sounds/done.wav \ 
--timer-finished-wav sounds/timer_finished.wav \
--timer-finished-wav-repeat 10 2

if you left click and highlight the code above you should be able to see the extra space that will become visable after the \ .
post a reply here with your code if you are still stuck and you may be able to get help once we can see the code you are using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants