alexa-pi / AlexaPi

Alexa client for all your devices! # No active development. PRs welcome # consider https://github.com/respeaker/avs instead
MIT License
1.33k stars 396 forks source link

Correctly do: progress reporting / stop / pause / clearBehavior / playBehavior #117

Open ksanghai opened 7 years ago

ksanghai commented 7 years ago

The music/media stops playing, if it is interrupted with a new query/request. Is this expected? I am guessing it is the limitation of the AVS v1 api and to be fixed with the new avs api?

renekliment commented 7 years ago

Hey! It is expected, but probably not desired, meaning it's the behavior that was implemented in the code and no one has gotten around changing that yet. It requires a few things, so it's not a five-minute fix.

And no, it doesn't have anything to do with the API version.

ksanghai commented 7 years ago

SoX playback handler might be a more elegant way to do this but I managed to make this work with software mixing using alsa. My USB sound card can now play multiple streams simultaneously. Here's my asoundrc file does the audio dmixing and here's the original link from alsa on software mixing.

Also, I have both the media and the speech working pretty well with the older repo... Its what I was working with originally and was familiar with.

Ofcourse, this is one way to do it.. just wanted to share that.

renekliment commented 7 years ago

As pointed out by @enclarify, the current progress reporting is broken. Acceptable values for playerActivity are IDLE, PAUSED and PLAYING and we feed it various crap. Also, we should send offsetInMilliseconds, so the playback can be later resumed. Basically go over the docs for all the events and make sure we honor the API.

Links:

renekliment commented 7 years ago

This should also fix audiobook pausing / resuming (#118).