Is it possible to use Alexa Voice Profiles with jovo?

amazon-alexa

#1

Hello community, i’ve a dude. With jovo is it possible to use the alexa user voice profiles for customize the awnsers and other features for my alexa skill user’s?.
I want to make personalized answers as shown in the following article:


#2

Hey @EverAcosta!

It’s in the v3 branch of the framework.

 /**
   * Returns a personId associated with a voice profile.
   * @returns {string}
   */
  getPersonId() {
    return _get(this, 'session.person.personId') || _get(this, 'context.System.person.personId');
  }

In v2, you can get it from the this.$request object.

this.$request.session.person.personId or this.$request.context.System.person.personId


#3

Hi, @AlexSwe I’ll try with your solution.
Very thanks :smiley:


#4

Hi again, i can’t find the attribute “person” in the object “session” :frowning:


#5

Does _get(this.$request, 'context.System.person.personId'); work?

Did you update to v3? this.$alexaSkill.getPersonId() is now available.


#6

Yes, i’m on the v3.0.5 but the method this.$alexaSkill.getPersonId() does not work and appears this error:
Message:
this.$alexaSkill.getPersonId is not a function
Stack:
TypeError: this.$alexaSkill.getPersonId is not a function`
And i I didn’t find the “_get()” documentation. Where i can find this info?


I apologize in advance for the inactivity in the forum, I was travelling and could not continue with the development of the project until now


#7

Hey @EverAcosta,

try this.$alexaSkill.$request.getPersonId().


#8

I’ve also had success using this.$alexaSkill.$user.getPersonId().