Samsung Bixby

Integration published by Jovo | 2,553 downloads

Build apps for Samsung's Bixby assistant platform

Bixby AudioPlayer

Learn more about how to use the Bixby AudioPlayer functionality.

Introduction

The AudioPlayer functionality can be used to stream any number of audio files, such as music or podcasts.

If you want to start a new AudioPlayer capsule with the intent of using the platform integration with the Jovo Framework, we recommend to start with our Bixby AudioPlayer Template. It comes with a very easy setup for using the AudioPlayer functionality, as well as all the Jovo models required for the integration to work properly. You can download it using the following command:

Prerequisites

Provide AudioPlayer-specific Bixby structures

To use the AudioPlayer functionality for Bixby, you need to add and train on a respective action, which will tell Bixby to expect required parameters to construct an audioplayer element.

Go ahead and add the following action to your actions/ folder:

Now, in your training tool, add a sample utterance for this action. As the goal, enter JovoPlayAudioAction, which is a predefined action inside models/Jovo/actions/. It uses the computed-input functionality and constructs a structure of type audioPlayer.Result based on the _JOVO_AUDIO_ property in JovoResponse.

Learn more about computed-inputs here.

However, this won't work yet, as Bixby doesn't know where the JovoResponse comes from. We need a way of telling Bixby, that the goal is JovoPlayAudioAction, but the input property comes from our PlayAudioAction we just created. Fortunately, there is a way to achieve this. When editing the training phrase inside the training tool, there is a little grey bar on the left side of the input field. When you click on that, a new window appears, which allows you to create a route for your utterance, specifying what route to take when this utterance is triggered to achieve the desired goal.

Training Example

Add a directive to your handler

As soon as your audio response is being handled by Bixby, it sends out a directive to your voice app, indicating that audio is about to be played. You must register that directive in your handler. If you want to return a response before the audio is being played, you need to do that in the directive.

The last thing you need to do is to register that directive inside your endpoints.bxb file.

Usage

Now that your capsule is ready for the AudioPlayer functionality, you can start using it in your code.

You can access the plugin like this:

Play

Enqueue

Meta Data

Samsung Bixby Changelog

Jovo Marketplace | GitHub | npm

Current version might be higher than the latest changes displayed below because of updates of dependencies.

2021-02-22 [3.5]

  • #901 Move setResponse from response to after.response middleware (@aswetlow)

2020-08-21 [3.0.25]

✨ New Features

3.0.20 (2020-05-28)

💅 Enhancements

3.0.11 (2020-04-06)

  • Updated Typescript to 3.8.x
  • Updated Prettier to 2.x

Committers: 2

3.0.6 (2020-03-04)

🐛 Bug Fix

Committers: 1

3.0.3 (2020-02-27)

💅 Enhancement

  • #680 Implement setBixbyHandler, Add code examples and layout paragraph to Bixby docs (@rubenaeg)
  • #682 Implement Bixby AudioPlayer directives (@rubenaeg)

Committers: 1

2.x

Find the 2.x changelog here.

Join Our Newsletter

Be the first to get our free tutorials, courses, and other resources for voice app developers.