News for hackers. Stuff that matters.
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by Someone on Tuesday June 25, 2024 @04:31PM (#40793244)
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 waveform that humans will (barely) notice but that is easily detected by a computer on top of the audio whenever the device says “Alexa”.

Still harder: obtain the transfer function and latency between the speaker(s) and its microphone(s) and, using that, compute what signal you expect to hear at the microphone from the speaker’s output, and subtract that from the actual signal detected to get a signal that doesn’t include one’s one utterances.

That function could be obtained from one device in the factory or trained on-device.

I suspect the first already is close to good enough for basic devices. If you want a device that can listen whilexalso playing music at volume, the last option can be helpful.

Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by throwaway211 on Tuesday June 25, 2024 @07:26PM (#40794849)
Could two Alexa's be put next to each other hailing themselves into eternity.
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by brookst on Saturday June 29, 2024 @11:41AM (#40831346)
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.
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by jaredsohn on Saturday June 29, 2024 @09:23PM (#40834506)
LLMs can do this for you (although no guarantee it will be a hit)
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by yial on Saturday June 29, 2024 @11:43PM (#40834995)
*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 Say... by toomuchtodo on Saturday June 29, 2024 @11:47PM (#40835012)
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by matheist on Tuesday June 25, 2024 @07:13PM (#40794774)
Transfer function would need to be learned online because room reverberations contribute a lot.
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by JoBrad on Saturday June 29, 2024 @11:19AM (#40831191)
I’ve interrupted my Echo with “Alexa, stop” or “Alexa <repeated phrase more clearly or louder>” while it is speaking. So it doesn’t stop listening when speaking.
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by Krastan on Saturday June 29, 2024 @11:41AM (#40831352)
Stop listening only when saying "Alexa" not just when speaking in general. So to test you'd have to time saying Alexa at the same time it is saying Alexa
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by kQq9oHeAz6wLLS on Saturday June 29, 2024 @11:39AM (#40831329)
It could stop listening only when it's saying the word "Alexa", or even just part of that word, and listen the rest of the time.
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by stavros on Saturday June 29, 2024 @11:37AM (#40831317)
They'll definitely do some cancelation of the signal they're sending, you can't really hear people saying commands over your own music otherwise.
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by davidmurdoch on Saturday June 29, 2024 @11:40AM (#40831337)
Wouldn't it be simpler to add noise above 20kHz and ignore the key phrase if the noise is present?
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by sgc on Saturday June 29, 2024 @11:54AM (#40831452)
That was my thought as well. Just use some form of acoustical fingerprinting. It would be very simple to do, and would be both robust and flexible.
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by lazide on Saturday June 29, 2024 @12:06PM (#40831542)
Even simpler is subtract any sound (and associated echoes) output through the speaker from any input received from the microphone.
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by colanderman on Saturday June 29, 2024 @12:26PM (#40831665)
Echo cancellation is much more complex than tone squelching, which is simple enough to be implemented in the analog domain.
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by brazzy on Saturday June 29, 2024 @12:30PM (#40831697)
Echo cancellation was implemented in the analog domain 50 years ago at the least.

It's wild to see someone assume this kind of thing requires machine learning algorithms.

Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by lazide on Saturday June 29, 2024 @01:58PM (#40832365)
I'm guessing they were (rightfully) pointing out it's still harder than just ignoring any input if there is a given tone. Which yeah, it is. I'm assuming they'd prefer to use that for things like advertisements though, since the cancellation approach lets them ‘listen’ while still talking/playing music/etc.
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by xx-bean-xx on Saturday June 29, 2024 @01:02PM (#40831955)
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
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by davidmurdoch on Saturday June 29, 2024 @01:16PM (#40832050)
Ah, I didn't think about that. Thanks for pointing that out. Typical mics sample at 48khz, but that wouldn't leave much head room. Echo devices have an array of mics, IIRC, so I wonder if they can effectively sample at a higher rate?
Re:Ask HN: How Does Alexa Avoid Interrupting Itself When Say... by astrange on Sunday June 30, 2024 @08:09AM (#40836731)
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.