My Voice Briefing
Check it out on the Google Assistant. Or ask your assistant, "Hey Google, talk to My Voice Briefing".
Usage
Install packages: npm install
Start the dev server with: jovo run --watch
Testing
So make sure only the i18n keys are returned instead of the full text go to src/config.js
and comment out the specified section.
Run tests with: jest test
Deployment
To deploy the language model to google assistant run: jovo build -p googleAction --deploy
Note: Every time you run this command to deploy to dialogueflow your webhook will be reset to the endpoint specified in project.js
.
To create zip bundle for Google Cloud Function: npm run bundle
Actions on Google Directory Info
Short Description: My Voice Briefing allows you to explore stories covering the voice space
Long Description: My Voice Briefing allows you to explore stories covering the voice space. My Voice Briefing covers stories about the Google Assistant and Alexa, as well as stories from Voicebot.ai and the Voice Summit blog. You can select one of the stories if you wish to hear a short summary. You can also choose to email yourself a link to the full story.
Invocations
- Talk to My Voice Briefing
- Ask My Voice Briefing for the latest stories about the Google Assistant
- Ask My Voice Briefing for the latest stories about Alexa | Cortana | Bixby
Agent
Content Sources
Use the rss-content endpoint from core backend API to get full article data from the RSS links by sending the the RSS link to the API. RSS feeds generated by http://fetchrss.com
News Sources
- Voicebot Google Assistant Specific News: http://fetchrss.com/rss/5ce8c95d8a93f8d5098b45675ceabe268a93f8f85a8b4567.xml
- Voicebot Alexa Specific News: http://fetchrss.com/rss/5ce8c95d8a93f8d5098b45675ceabe6c8a93f80c5b8b4567.xml
- Voicebot Siri Specific News: http://fetchrss.com/rss/5ce8c95d8a93f8d5098b45675cfbc03d8a93f8e25d8b4567.xml
- Voicebot Cortana Specific News: http://fetchrss.com/rss/5ce8c95d8a93f8d5098b45675cfbc0b98a93f898628b4567.xml
- Voicebot Bixby Specific News: http://fetchrss.com/rss/5ce8c95d8a93f8d5098b45675cfbc0f38a93f866668b4567.xml
Voice
Uses the En-GB male voice because it is easier to listen to and sounds closer to the target newscaster voice. The action doesn't match voices to specific locales. En-AU is to fast.
Intents
Intro | Intent: LAUNCH
Initializes all the user variables. Redirect: InitialContentIntent
Initial Content | Intent: InitialContentIntent
Provide welcome message. Can also provide the user the help_menu depending on the context. User is asked which topic they want to hear more about.
List of topics | Intent: ListOfTopicsIntent
Explains the list of topics based on the possible RSS feed sources. Prompts the user to invoke the intent for a specific topic. Shows suggestion pills.
Specific News Topic | Intent: example AlexaStoriesIntent
Same intent structure used for each RSS source, the only thing that changes is the RSS link used for fetching the articles and the introduction. 3 articles are presented similar to The Guardian Skill (See Action Blueprint, Headlines).
Voice: Read the titles using an announcer voice, read the first sentence using a reading voice.
Generate an SSML description to read from the 5 headlines This SSML should include transitions (1st, 2nd, 3rd …) which should be replaced by human voice eventually.
Ask: Let me know which story you would like to explore?
-The ON_SELECT_HANDLER does not work on speakers so users must use Ordinal selection for now.
Follow Up State: ORDINAL_SELECTION_STATE
Article Card design
Using the Jovo google assistant card builder. A list selector of option items. The title is used as a synonym. And the title is used as the selection key. This card is shown while SSML is read.
Select an Article | Intent: ON_ELEMENT_SELECTED
This is automatically called after user select an element in the list by Voice, tap, or Cardinal index. Save the selected article INDEX to the user data of the session.
Redirect: ArticleInfoIntent
Select an Article | Intent: ORDINAL_SELECTION Context: OrdinalSelection
This is a nested intent. Can only be invoked if there is a this.followUpState(ORDINAL_SELECTION_STATE)
called before.
Handler exists to make selection work on Speakers where ON_ELEMENT_SELECTED does not work. Has nested handlers that recognize 1st, 2nd, 3rd, … ordinals. Saves the selected article INDEX to the user data of the session. The index corresponds to the ordinal handler.
Set: this.$user.$data.ordinalSelection = true
If variable is set to true in Unhandled() because user did not use ordinal selection, reprompt asking: “Would that be the 1st, 2nd, or 3rd story”.
Redirect: ArticleInfoIntent
Get Article Info Card | Intent: ArticleInfoIntent
Uses the article data stored in session variable to create an info card on the selected title.
Speak: The introduction of the article Show: Image, Title, Description, Link to read full
Ask: Next story or the list of topics?
Email story link | Intent: EmailArticleLinkIntent
If the user is signed in get their email from this.$user.$data.email
.
Can then send the email containing information on the story using the SendGrid API.
Use node.js client to populate the template variables and send a transactional email template using the templateID.
Ask: What to do next?
Use this.$user.$data.accountData
to check if the user is signed in.
If not, then show the user and account linking card with this.showAccountLinkingCard();
. Guide.
The sign in itself is handled with the ON_SIGN_IN()
intent.
Next story (YES or NO) | Intent: NextStoryIntent
Can only be invoked if there is a this.followUpState(‘SelectNextMove’) called before. This intent increases the index of the selected article and redirects to ArticleInfoIntent.
Get Help, or what can you do | Intent: HelpIntent
Invoked when the user says something along the lines of, help, what can you you.
The help Intent talks about what the Action can do.
Solution to redirects with a message: Redirects to initial content. Initial content checks if isHelp variable is true and can add a help message.
(If articles) Ask: Looks like you where exploring …, want to see related? (No articles) Ask: Would you like to see some trending articles?
About Intent | Intent: AboutIntent
Used to give the use more information about the action, and creator website. Leaves an open response. User can trigger help intent, or initial content intent.
Unhandled (Fallback intent)
Set a follow up state TRY_AGAIN for routing the Yes / No intents in this context.
Asks with a random choice from: ["I had trouble understanding.", "I’m sorry. I’m having some trouble understanding what you said.", "I didn’t quite get that."]
.
The YesIntent is trained to recognize "go back" as a phrase if the user chooses to repeat the question instead of saying yes.
Ask: Do you want to go back?
Project Resources
- Dialogflow: my-voice-briefing
- Google cloud: wyzefind-jovo-integration
- Analytics: Dashbot