Defines age and gender roles that can be applied to change the voice
characteristics. Used with the express-as element to simulate different
speakers. Only supported by certain Azure neural voices.
Roles by age group:
Girl: Young female child
Boy: Young male child
YoungAdultFemale: Young adult woman (20s-30s)
YoungAdultMale: Young adult man (20s-30s)
OlderAdultFemale: Middle-aged woman (40s-50s)
OlderAdultMale: Middle-aged man (40s-50s)
SeniorFemale: Elderly woman (60+)
SeniorMale: Elderly man (60+)
Example
// Child voice for storytelling voice.expressAs('Once upon a time...', { style: 'narration-relaxed', role: 'Girl' });
// Different character voices in dialogue voice.expressAs('"Hello there!"', { role: 'OlderAdultMale' }); voice.expressAs('"Hi grandpa!"', { role: 'Boy' });
Speaking roles for the express-as element.
Defines age and gender roles that can be applied to change the voice characteristics. Used with the express-as element to simulate different speakers. Only supported by certain Azure neural voices.
Roles by age group:
Girl
: Young female childBoy
: Young male childYoungAdultFemale
: Young adult woman (20s-30s)YoungAdultMale
: Young adult man (20s-30s)OlderAdultFemale
: Middle-aged woman (40s-50s)OlderAdultMale
: Middle-aged man (40s-50s)SeniorFemale
: Elderly woman (60+)SeniorMale
: Elderly man (60+)