The audioservice can now jump forward and backward in the audio stream/file
The functionality is accessed via the audioservice class's seek_forward(),
seek_backward() and seek() methods
The common play skill sends a stop message in the CPS_start(), if the play message is sent too close to the stop message it may be executed before the stop message causing playback to immediately stop.
To circumvent this a 1 second stop ignore time is added.
* Add repeat option to audioservice
The audioservice.play() method now accepts a repeat parameter. If this
parameter is True the playlist passed to the audio service will be
repeated.
* Add repeat support to vlc
* Add the repeat parameter to all services
Not functional but playback will work at least. Hacktoberfest?
* Use correct method to guess mime type
* Use the commands from mycroft.conf
- Remove hardcoded commands and use the ones from mycroft.util to handle
configurations.
- Improve error handling
This is reimplementation of #1649 which became divergent.
## Description
Adds a Ogg123Service and a play_ogg exactly like Mpg123Service and play_mp3
## How to test
I have a skill for a podcast which does not have an mp3 feed:
https://github.com/joshuacox/skill-GNUworldOrder
## Contributor license agreement signed?
signed by @joshuacox
This fixes a stray lock.release() causing a silent
RuntimeError: release unlocked lock
after TTS execution but just before reporting the timing for the TTS system.
* Handle stop correctly in the audio service.
This allows for example the news skill playback to be stopped without
the listening being triggered.
* Handle case where service stops at end of playlist
- Fix issue when receiving multiple stop signals
- Stop method of services now returns True or False depending on if audio was playing
The Mark 1 button press can now be "consumed" when a skill handles
the Stop command. When this happens, the button press will not
trigger listening mode. An additional press would be needed to
trigger listening.
This introduces the "mycroft.stop.handled" messagebus message. It
carries a data field called "by" which identifies who handled it.
Currently the values are "TTS" for when speaking ends or the name
of a skill which implements Stop and returns True from the call.
Also fixed a potential bug when the flag to clear queued visemes
was left set after a button press.
The default method for the services call stop, in the chromecast case this isn't desirable since any playing application would be shutdown (even if mycroft didn't initiate it).
This overrides default behaviour and will merely disconnect from the device at shutdown.
- Engines now specify if they support ssml rather than the configuration
- The text client strips out ssml tags
- Engines can modify tags via the `self.modify_tag` method
This sends a ctrl+c signal to each process which will allow code to exit properly by handling KeyboardInterrupt
Other notable changes:
- create_daemon method used to clean up create daemon threads
- create_echo_function used to reduce code duplication with messagebus
echo functions
- wait_for_exit_signal used to wait for ctrl+c (SIGINT)
- reset_sigint_handler used to ensure SIGINT will raise KeyboardInterrupt
This can be replaced by ensuring the final except clause is 'except Exceptions'. This works because SystemExit and KeyboardInterrupt do not inherit from the base 'Exception' class
* Made MycroftSkill.remove_event() return a bool, preventing unnecessary/misleading message from being posted by MycroftSkill.cancel_scheduled_event()
* More doc and several minor renames around intent processing
* Several minor typo and doc corrections
==== Tech Notes ====
When a new track starts playing the audio service will send a message
indicating which track has started.
==== Protocol Notes ====
"mycroft.audio.service.track_start" message added