alandtse / alexa_media_player

This is a custom component to allow control of Amazon Alexa devices in Home Assistant using the unofficial Alexa API.
Apache License 2.0
1.52k stars 289 forks source link

Know the voice ID that alexa has invoked #1966

Closed MagoPoza closed 1 year ago

MagoPoza commented 1 year ago

NOTE: For a feature to be created it has to be doable in the Amazon app because we are basically replicating the app for HA. If you can't find it in the app, we probably can't create it here.

Is your feature request related to a problem? Please describe. On many occasions I would like to be able to know in Home Assistant the voice ID that has invoked Alexa to be able to execute actions depending on whether it is a person or another

Describe the solution you'd like Get an event with an ID to be able to differentiate the people who invoke alexa

Describes alternatives you've considered None

Additional context None

alandtse commented 1 year ago

Can Alexa routines access this? I can't do this as I will not enable voice ID on my devices but happy to take a PR.

MagoPoza commented 1 year ago

¿Pueden las rutinas de Alexa acceder a esto? No puedo hacer esto porque no habilitaré la identificación de voz en mis dispositivos, pero estoy feliz de tomar una PR.

With alexa routines it cannot be done but in the alexa voice ID documentation it says the following:

  1. How does Voice ID work?

You can create a Voice ID so Alexa can call you by name and do more to personalize your experience. When you create a Voice ID, Alexa uses recordings of your voice to create an acoustic model of your voice characteristics. Alexa stores these acoustic models in the cloud (Cloud). If your Voice ID isn't recognized within three years, we'll automatically erase the acoustic model of your voice. If Alexa recognizes your voice when you're using a third-party Skill, that Skill may be given a numerical identifier that allows it to distinguish you from other users in your home to better personalize your experience. You can remove your Voice ID to turn off third-party skill personalization based on your Voice ID in the Alexa app. Deleting your created Voice ID will also delete the voice recordings of what you said to teach Alexa when you created your Voice ID. You can also review voice recordings attributed to a particular voice profile and delete those voice recordings by visiting Settings > Alexa Privacy in the Alexa app and Echo Show devices or at https://www.amazon.com/ alexaprivacysettings.

According to this, when using a skill you can obtain an ID number from a voice, I don't know if you could get something that way. I currently use the Developer Skill built to link alexa to the Home Assistant. Thank you very much for your attention, greetings.

alandtse commented 1 year ago

We don't use the skill API. We use the web app API. If it's not available at the web app or routines then it's probably not available for this.

amaisano commented 1 year ago

You can use the custom Alexa Home Assistant intentions if you want to try this as those are considered skills.

MagoPoza commented 1 year ago

You can use the custom Alexa Home Assistant intentions if you want to try this as those are considered skills.

I'm sure it can be done that way, but I don't know how to do it. I currently use this skill for voice actionable notifications: https://github.com/ccorderor/alexa-actions I suppose the code of the skill would have to be modified

qreeves commented 1 year ago

Only skills can do this. It would require the Home Assistant skill to implement it (and pass the requirements). This is not something the Alexa Media Player custom integration can accomplish.

github-actions[bot] commented 1 year ago

The issue has received no activity for 60 days and will be closed in a week.