I am using SpeechSynthesisUtterance for text to speech in my browser. How can I mute and unmute the ongoing speech on button click?
You may change the SpeechSynthesisUtterance.volume property. For muting make SpeechSynthesisUtterance.volume = 0.
Actually, there is no way to mute the ongoing speech. You can cancel the running speech, mute the volume using SpeechSynthesisUtterance.volume property and restart the speech.
Related
Is there an API or something similar for MS Teams that tells if my microphone in a current call is muted or not?
I want to build an external light (green / red) showing whether my mic is muted or not. Probably I will use an ESP32 module for that
I have a Plantronics headset that has a led light indicating when it is muted on Teams, so I believe that there is an API for that...
I found this similar solution but it's a button to mute and, consequently, when press it, the light will change. But I want something just to detect the mute. - https://www.instructables.com/Microsoft-Teams-Mute-Button/
I couldn't find anything on internet about this..
Thanks for your attention!
WASAPI is documented as not sending audio data if nothing is playing any sound, e.g. this note about WASAPI in NAudio:
Now there is one gotcha with WasapiLoopbackCapture. If no audio is playing whatsoever, then the DataAvailable event won't fire. So if you want to record "silence", one simple trick is to simply use an NAudio playback device to play silence through that device for the duration of time you're recording. Alternatively, you could insert silence yourself when you detect gaps in the incoming audio.
I have written a WASAPI listener, but on my machine, it always fires even when nothing is making any sound. Other users indeed report that when nothing is playing, the signal stops.
So I think some process must be making Windows think that something is playing on my machine, but I can't figure out what it is.
How can I find the source of this phantom audio?
This isn't much of an answer, but when I rebooted, the issue went away. I am assuming that some application like Spotify was playing something, even though it wasn't audible.
As I understand pressing a button on your phone's keypad sends an in-band DTMF tone to the other party. This is not actually sending a telephone signal of any sort, just sends the respective DTMF sound over the voice path.
When an IVR prompts me for entering DTMF tones - instead of pressing a button on the phone, what if I played pre-recorded .WAV files containing the DTMF sounds real loud at my end? Assume these files have excellent quality audio in them.
Is that technically the same thing? Can it be expected to work?
Yes, that will work fine. If you could hum accurately enough, that would work too, but I wouldn't recommend it!
Is there any way to get notified when the desktop image changes? The simplest way would be through notifications but I haven't found any for this in particular.
Unfortuantely, there's no way to detect the user's wallpaper or to monitor when it has changed. We simply don't have access to that information.
I am writing a parental control app using PyS60 ( on Nokia E72)
The app is operated via sms's.
Every sms that operates the app is deleted when entering the inbox listener's callback, and by using a blank audio file, I manage to cancel the "new message" sound alert.
However,
this only works when the focus in on Python Script Shell.
Meanning - when I switch to desktop, or any other app that is open, the new message alert sound is playing.
My guess is - I'm losing the race with the messaging module (or process race condition),
Does anyone know how to make this work while running in background?
Or even cancel the process that handles incoming sms's and deal with it myself?
Or lower the priority of the process ??
any other suggestions are also welcome..
thank in advance,
Amitos80