Goals
Our main goal was to be able to ask Heimdall for the news.
He should be able to:
- read some headlines
- give us more information about specific headlines
Rhasspy
In Rhasspy we have to add new lines to the sentences.ini
:
[News]
lies mir die nachrichten vor
was gibt es für neue nachrichten
was gibt es neues
[NextNews]
weiter
zur nächsten nachricht
[MoreNews]
mehr
ich hätte gerne mehr (infos | informationen)
Example sentences
Some example sentences are:
1. Lies mir die Nachrichten vor.
2. Was gibt es Neues?
3. Zur nächsten Nachricht.
4. Ich hätte gerne mehr Infos.
Node-Red
You can find the flow for all functions of this feature here.
Update the news
We decided to use the RSS-Feed of the “Tagesschau”, because it is free and easy to use.
The nodes are used for:
injection
-node: runs the process every 15 minuteshttp-request
-node: requests the RSS-Feed of the “Tagesschau”xml
-node: converts the xml-file to jsonfunction
-node: formats the json file and saves it
Read the news aloud
The link-out
-node is connected to our main TTS-node.
The green
section is used to get the headlines:
function
-node(left): setup an index and creates a beginning message for TTSfunction
-node(top): adds a headline to the message/reads the titles of the news from the stored datafunction
-node(bottom): increases the index/creates the end of the news block, if there are no news leftswitch
-node: decides (based on the index) if the next headline should be read or if the feature should be stopped
The red
section is used to control this feature:
function
-node: is connected to the Command-Request-Callback-Node (via thelink-in
-node) and filters incoming messages by sourceswitch
-node: switches by incoming intents (e.g.[NextNews]
,[Stop]
)
The blue
section is used to get more information about a headline:
function
-node: reads the stored description of the headline and creates a TTS-message
The yellow
section is used to handle wrong intents or [Stop]
:
function
-node(top): creates TTS-message as feedback for the[Stop]
function
-node(bottom): creates TTS-message as feedback, if there was a wrong or unknown intent detected
Loop
The link-in
-node is connected to our TTS-Callback-Node, the link-out
-node is connected to the Command-Request-Node.
All TTS-messages in this feature, except the one for the [Stop]
intent, are tagged with the source “news”.
We used this to create a loop to control the output.
The nodes are used for:
function
-node: filters by the sourcedelay
-node: delays the message by one second to prevent errors
Sources
What’s Next?
You want to know how it works?
Look at our Tech-Stack!