Alexa is the speech processing and personal assistant technology behind Amazon Echo. Speech-based user interfaces represent one of the next major disruptions in computing and the Alexa Voice Service (AVS) provides you with an opportunity to take advantage of this new form of interaction. In this session, we’ll walk through the recently-released AVS API by building a voice-enabled application and then go behind the scenes with Alexa, diving into the architecture and unique technical challenges faced during development.
4. What is ASK?
The Alexa Skills Kit (ASK) is a
collection of self-service APIs,
tools, documentation, and code
samples that make it fast and
easy for you to add skills to
Alexa. Using ASK, you can teach
new skills to Alexa in just a few
hours.
5. Alexa companion app
• Register a device
• View and manage actions
• Link third-party accounts
• View lists
• And much more
8. Basic AVS request
1) Create an HTTP request
2) Collect the audio and send the request
• Use “Transfer-Encoding: Chunked” for streaming the request or
set “Content-Length” for sending prerecorded audio
• Avoid storing the audio
3) Parse the response
4) Handle each directive
9. Basic AVS request: Write HTTP headers
POST /v1/avs/speechrecognizer/recognize HTTP/1.1
Host: access-alexa-na.amazon.com
Authorization: Bearer {ACCESS TOKEN} From auth flow
Content-Type: multipart/form-data; boundary={BOUNDARY TERM}
Transfer-Encoding: chunked OR Content-Length: {LENGTH}
10. Basic AVS request: Send the audio
--{BOUNDARY TERM}
Content-Disposition: form-data; name="request"
Content-Type: application/json; charset=UTF-8
"messageBody": {
"profile": "alexa-close-talk", Speech model
"locale": "en-us",
"format": "audio/L16; rate=16000; channels=1"
}
--{BOUNDARY TERM}
Content-Disposition: form-data; name="audio"
Content-Type: audio/L16; rate=16000; channels=1
{ENCODED AUDIO} 16 bit linear PCM at 16 kHz
11. Basic AVS request: Parse the response
HTTP/1.1 200 OK
Content-Type: multipart/related; boundary={BOUNDARY TERM}
--{BOUNDARY TERM}
Content-Type: application/json; charset=UTF-8
{ "messageHeader": {},
"messageBody": {
"directives": [ {
"namespace": “{AudioPlayer | SpeechSynthesizer}",
"name": “{DIRECTIVE}",
"payload" : {
--{BOUNDARY TERM}
Content-Disposition: form-data; name="audio"
Content-Type: audio/mpeg
Content-ID: {CONTENT ID}
{ENCODED AUDIO DATA} If directive is speak, play this back to the user
12. AVS response directives
Directive Meaning
clearQueue Clear the playback queue
listen Multi-turn interaction - listen for more audio
play Play a streaming URL
speak Speak the Alexa response to the user
stop Stop streaming playback
13. Streaming events
Event Meaning
metadataAvailable Metadata associated with the selection in the
audio player
playbackError Audio player has experienced an issue during
playback
playbackFinished Audio player has completed playback
playbackIdle Audio player has reached the end of the
playlist
playbackInterrupted Audio player has been interrupted
playbackProgressReport Current state of the audio player
playbackStarted Audio player has started playing
33. SMART AGENTS FOR BMW DRIVERS.
BMW Group Technology Office USA.
Stephen Chien
34. THE AUTOMOTIVE INDUSTRY WILL UNDERGO
MASSIVE CHANGES IN THE NEXT 10 YEARS.
SUSTAINABILITY DIGITALIZATION
CARS ARE POWERED BY
ELECTRICITY
CO2 SUSTAINABILITY HAS
GAINED GREATER SIGNIFICANCE
VEHICLES ARE DRIVING ALMOST
ACCIDENT-FREE
MOBILITY CONCEPTS LIKE CAR-
SHARING ARE WIDELY AVAILABLE
VEHICLES BECOME PART OF
THE DIGITAL ECOSYSTEM
HUMAN-MACHINE INTERFACES
BECOME MORE INTUITIVE
35. BMW i – THE NEXT GENERATION OF A CONNECTED
CAR.
Wearable
Integration
Smart TV
Integration
Smartphone
Integration
36. PERSONAL SMART AGENTS FOR BMW DRIVERS.
• Smart agents are everywhere
in life.
• Natural way to interact with
your vehicle.
• Easy for users to understand
and use.
• A smart agent that knows
about you and your vehicle.
37. PROTOTYPING AN ALEXA SKILL FOR BMW i.
Leveraging Amazon’s developer
platform.
• Built on AWS technology.
• ASK and AVS provide a seamless
user experience.
• ASK and AVS provide open
platforms.
BMW skill features.
• Request vehicle status through
Alexa.
• Execute vehicle commands
through Alexa.