Live data from Hacker News

Ask HN: How does Alexa avoid interrupting itself when saying its own name?

news.ycombinator.com

51–60 of 61 posts

Re: Ask HN: How does Alexa avoid interrupting itself when saying its own name?

#51
post #23

Earlier quoted context omitted.

Could two Alexas be put next to each other hailing themselves into eternity.

I’ve always wanted to write a hit pop song called “hey Alexa, order twenty pounds of sand”. Only a complete lack of hit songwriting ability has stopped me.

*Verse 1:* Woke up this morning with a plan in my head, Gonna build a castle, need a lot of sand, Grabbed my phone, started to command, Hey Alexa, can you lend a hand?

*Pre-Chorus:* I’m feeling like a kid again, Dreaming of the seaside, In my living room, I’ll make my own tide.

*Chorus:* Hey Alexa, order twenty pounds of sand, We’ll turn my place into a beachy wonderland, Dancing barefoot, got the sun in our hands, Hey Alexa, won’t you understand?

*Verse 2:* Neighbors think I’m crazy, but they don’t know, I’ve got the waves crashing, the good vibes flow, With a little magic from my techy friend, We’re surfing in the living room, it’ll never end.

*Pre-Chorus:* Turn up the heat, let’s make it bright, With a pinch of paradise, Every day feels like a summer night.

*Chorus:* Hey Alexa, order twenty pounds of sand, We’ll turn my place into a beachy wonderland, Dancing barefoot, got the sun in our hands, Hey Alexa, won’t you understand?

*Bridge:* Building castles, making dreams, Feeling free, it’s the ultimate scheme, With every grain, we’re setting the scene, Life is better when it’s sandy and serene.

*Chorus:* Hey Alexa, order twenty pounds of sand, We’ll turn my place into a beachy wonderland, Dancing barefoot, got the sun in our hands, Hey Alexa, won’t you understand?

*Outro:* So next time you’re dreaming of the shore, Just remember what Alexa’s for, A little voice can bring the beach to your door, Hey Alexa, we’re ready for more.

Re: Ask HN: How does Alexa avoid interrupting itself when saying its own name?

#52
post #4

The simple solution: switch off the code that listens for the “Alexa” prompt when saying “Alexa” yourself. Slightly harder: keep it running, but discard hits that are timed close to the time you say “Alexa” yourself. Even harder: have a second detector that is trained on the device saying “Alexa”, and discard hits that coincide with that detector firing. That second detector can be simplified by superimposing a wavef…

Could two Alexas be put next to each other hailing themselves into eternity.

https://www.youtube.com/watch?v=ESt7CTZiXqY (NSFW)

Re: Ask HN: How does Alexa avoid interrupting itself when saying its own name?

#53
post #23

Earlier quoted context omitted.

I’ve always wanted to write a hit pop song called “hey Alexa, order twenty pounds of sand”. Only a complete lack of hit songwriting ability has stopped me.

LLMs can do this for you (although no guarantee it will be a hit)

[deleted]

Re: Ask HN: How does Alexa avoid interrupting itself when saying its own name?

#54
post #34

This is achieved using Acoustic Echo Canellation (AEC). This essentially subtracts the output of the speaker as well as reverberations from the room from the microphone input. Here's a youtube video explaining the basic principle: https://www.youtube.com/watch?v=bJKGrheOoY4 Source: worked on 3rd party Alexa speakers

This is also the reason you can (sometimes) video conference on your laptop without headphones plugged in. The software does not (or at least tries not to) record its own output.

You only notice it if you try to use different devices for speakers and microphone - you'll get a feedback loop, since the AEC only works on the same device.

Re: Ask HN: How does Alexa avoid interrupting itself when saying its own name?

#55
post #40
post #11

More interesting is when we used to run Alexa commercials and it would cause a denial of service attack on ourselves with all the devices being triggered, particularly during the superbowl. In that case, we added some imperceptible noise to the audio stream so that Alexa wouldn’t trigger.

The other approach is to remove certain noise. If there is nothing in the frequency range from 3kHz to 6kHz Alexa won't wake when a wake word is spoken. https://youtu.be/iNxvsxU2rJE doesn't wake up anything. https://www.theverge.com/2018/2/2/16965484/amazon-alexa-supe... > Apparently, the Alexa commercials are intentionally muted in the 3,000Hz to 6,000Hz range of the audio spectrum, which apparently tips off the sys…

I'm guessing this is because plenty of speakers aren't designed to output sound outside of typical hearing range (because, I mean why bother for a TV etc)

Re: Ask HN: How does Alexa avoid interrupting itself when saying its own name?

#56

Earlier quoted context omitted.

Wouldn't it be simpler to add noise above 20kHz and ignore the key phrase if the noise is present?

no, because that 20+khz noise would be lost in any 44khz signal processing. you would have to guarantee the audio player is capable of higher bitrates

It also isn't resilient to room echo/reflections, or EQ if people hook it up to their own speaker systems.

If you listen to the Apple keynote, anytime someone says Siri the audio has been very audibly lowpassed, presumably that's enough.

Re: Ask HN: How does Alexa avoid interrupting itself when saying its own name?

#59

This is achieved using Acoustic Echo Canellation (AEC). This essentially subtracts the output of the speaker as well as reverberations from the room from the microphone input. Here's a youtube video explaining the basic principle: https://www.youtube.com/watch?v=bJKGrheOoY4 Source: worked on 3rd party Alexa speakers

Fundamental principle at work is adaptive filtering. it also has uses in noise canceling headphones, voice conferencing software, and radar/sonar in some cases. No LLMs or deep learning at all - purely DSP!

[dead]

Re: Ask HN: How does Alexa avoid interrupting itself when saying its own name?

#60

It can be done in a single line of code, like this JS example: "wakeWordHeard && !sayingAlexa ? doWakeWordCommand() : null"

I don’t have one of those Amazon things but from OP’s phrasing I’m guessing that it’s possible to interrupt Alexa even while it’s talking. That would imply this lock isn’t in place.

I’m guessing that the device just cancels out the output waveform from the input.

Post reply on HN