We a building a chatbot app for Google Home using Api.ai (Dialogflow now) which has both male and female historical figures. We are using Actions on google. Google lets you default to a male or female voice when deploying the app. Is there a way to switch between male to female voice dynamically, for example, using code in webhook?
The Dialogflow Essentials (ES) Edition is a pay-as-you-go edition that provides the standard ES agent type. The Essentials Edition offers production-ready quotas and support from Google Cloud support. The Dialogflow Customer Experience (CX) Edition is a pay-as-you-go edition that provides the advanced CX agent type.
A Dialogflow CX agent is a virtual agent that handles concurrent conversations with your end-users. It is a natural language understanding module that understands the nuances of human language.
Dialogflow sends an API interaction response for each step of slot filling. For each of these slot filling responses, the intent and action will be the same, and the parameters collected so far will be provided. When building an agent, you provide prompts that the agent will use to get parameter data from the end-user.
Dialogflow uses a state-based data model which allows developers to reuse different components including intents, entities, and webhooks. It also enables developers to define transitions, data conditions for different flows, and also handle deviations from the main topic or simultaneous questions effortlessly.
Maybe. Although SSML supports a <voice>
tag, the documentation for Actions does not list it as supported. However, as you noted, there appears to be some support. The gender
and variant
attributes seem to work, at least for en-US. The languages
attribute doesn't seem to be. So something like this might work:
<speech>
<voice gender="male" variant="1">male</voice>
<voice gender="male" variant="2">male</voice>
<voice gender="female" variant="1">female</voice>
<voice gender="female" variant="2">female</voice>
</speech>
However what is documented as working is to adjust the pitch of the default voice (whichever one you pick) using the <prosody>
SSML tag. Here is an example you can use to see how it sounds if you vary the pitch:
<speech>
test
<prosody pitch="-1st">test</prosody>
<prosody pitch="-2st">test</prosody>
<prosody pitch="-3st">test</prosody>
<prosody pitch="-4st">test</prosody>
<prosody pitch="-5st">test</prosody>
<prosody pitch="-6st">test</prosody>
<prosody pitch="-7st">test</prosody>
<prosody pitch="-8st">test</prosody>
<prosody pitch="-9st">test</prosody>
<prosody pitch="+1st">test</prosody>
<prosody pitch="+2st">test</prosody>
<prosody pitch="+3st">test</prosody>
<prosody pitch="+4st">test</prosody>
<prosody pitch="+5st">test</prosody>
<prosody pitch="+6st">test</prosody>
<prosody pitch="+7st">test</prosody>
<prosody pitch="+8st">test</prosody>
<prosody pitch="+9st">test</prosody>
</speech>
You can also combine the two tags.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With