Search code examples
bixbybixbystudio

Implementing voice control next / previous / pause / resume with audioPlayer


I've built an audioPlayer Capsule that retrieves and plays a playlist of audio from a remote endpoint.

In the simulator and on my Galaxy s9, I can invoke the Capsule & play audio. I can also use the navigation controls to skip forward / go back.

However, in both the simulator & the device, Next, Previous, Pause, Stop, and Resume commands are all interpreted as PlayPlaylist Actions (which passes my playlist to audioPlay.PlayAudio) and simply start playing the audio from the beginning.

Do I need to hook into or build new Actions to manually trigger these audio control functions? I figured these would be "free" or built-in.

Additionally, I'm trying to figure out how to identify which AudioItem index I'm playing, so I can update the result view.


Solution

  • Voice command such as play/stop/next/previous/resume are built-in for audio player (not the library, but in marketplace itself).

    Thus, developer at current stage has no control over the audio player once start player and has to rely on the voice command.

    As a result:

    1. Developer should NOT add training for these voice command.
    2. There is no way to test the voice command in IDE or on-device testing, but rest assured that once your capsule released to marketplace these voice command would work.
    3. You can check any of the sleep sound capsule in market place and verify the feature. None of them has training for voice command.