In this edition of the .NET Fiddle Newsletter, we will talk about creating interactive voice action for Google Speaker/Assistant.
This newsletter was brought to you by Aliens (1985).
The movie is a follow-up to Ridley Scott’s Alien (1979) which is a classic in its own right. It has a lot more action than the original, but also plenty of scares and even some comedy. I watched it recently and I am happy to report that it has really stood the test of time. I laughed, I cried, I crawled into a ball and whimpered lightly when the Alien found me and opened its mouth. Luckily Ripley appeared and kicked Alien’s ass.
Fortunately, there were never any sequels/prequels to these two amazing movies, or that would besmirch the saga of Alien/Aliens.
Hey Google, Talk to Wall Street Bets
At this point, everyone already has Google Speaker or Amazon Alexa at home. You can ask it for today’s weather or to sing you a song, but what else can you do with it?
To extend Google Speaker/Assistant, there is a Google Actions framework, which lets developers create custom google actions. One such action is “Wall Street Bets”. If you have Google Speaker or Google Assistant, you can try it right now, just say
”Hey Google, Talk to Wall Street Bets”.
/r/wallstreetbets is a subreddit on Reddit which is all over the news these days. If you haven’t heard about the “Gamespot saga”, then you must be living under a rock, not that there is anything wrong with that. Even New York Times has been trying to explain “tendies” and “yolo” to their audience in recent days.
The magic of Voice, driven by C# API
Both Google and Amazon have come a long way in understanding speech (and recording everything you say to sell you more ads and products).
Google made it easy to create custom interactive Voice actions. When I wanted to write a Google Action for “Wall Street Bets” I followed this guide:
It was pretty easy to setup generic conversation flow, but what fun is it to keep using the same replies. Luckily there is a simple way to replace canned replies with a call to API.
Here is the fiddle that demonstrates how google calls the API and what is returned.
https://dotnetfiddle.net/0SerLb
It has the same code that I used to handle “top_posts” requests in “Wall Street Bets” google action.
Did you know that Bill Paxton (RIP) is one of the only two actors who was killed by all three: Predator, Alien, and Terminator. Death in Terminator is a bit iffy, but the way his compandre dies is worth at least 3 deaths.
The only other actor, who was killed by all three, is Lance Henriksen who played Bishop, the android, in Aliens. He gets shot by Terminator and stabbed by Predator. In Aliens he gets ripped apart, but not 100% clear if he died from it.
I can’t end this newsletter without mentioning how awesome was Sigourney Weaver, as Ripley. That scene in the elevator, where she gears up, takes a couple of moments to collect herself, then turns on the flamethrower and prepares to face the queen, is just sooo bad-ass. This is how you do a strong female lead.
Most recent posts:
.NET Fiddle learns Karate: strike first, strike hard, no mercy!
Parse the HTML page into structured and readable data.
.NET Fiddle searches for best Star Wars, but instead finds this...
Check out the new C# 9.0 features in .NET 5.
If you want to unsubscribe, click on the unsubscribe link at the bottom of this email, but watch out for the facehuggers.
The best is yet to happen.