Add car manual voice skill

This commit is contained in:
Ceda EI 2020-12-21 20:38:28 +05:30
parent cde0f8ec3f
commit 22de5213b5
7 changed files with 97 additions and 0 deletions

4
car-manual-skill/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
__pycache__/
*.qmlc
settings.json

View File

@ -0,0 +1,17 @@
# <img src="https://raw.githack.com/FortAwesome/Font-Awesome/master/svgs/solid/info.svg" card_color="#8CE0FE" width="50" height="50" style="vertical-align:bottom"/> Car Manual
Gives information for your car
## About
Gives information for your car
## Examples
* "How to enable child lock"
## Credits
FireWalkers
## Category
**Information**
## Tags

View File

@ -0,0 +1,35 @@
from mycroft import MycroftSkill, intent_file_handler
import requests
def emit(osd_url, event, data):
json = {
"event": event,
"data": data
}
print(json)
return requests.post(osd_url, json=json)
class CarManual(MycroftSkill):
def __init__(self):
MycroftSkill.__init__(self)
@intent_file_handler('manual.car.childlock.intent')
def handle_manual_car(self, message):
dialog = self.dialog_renderer.render("manual.car.childlock", {})
url = self.settings.get("OSD_API", "http://localhost:5050/send")
emission = {
"plugin": "manual",
"data": {
"title": "Child Lock",
"description": dialog
},
"time": 5000
}
emit(url, "switchPlugin", emission)
self.speak(dialog)
def create_skill():
return CarManual()

View File

@ -0,0 +1 @@
To enable child lock, slide the lock along the edge of the door.

View File

@ -0,0 +1 @@
How to enable child lock

View File

@ -0,0 +1,29 @@
# This file details all external dependencies required by your skill. If your skill does
# not require any dependencies, please delete this file before submitting a pull request.
#
# To use this file, uncomment the lines you need, and fill in the appropriate information.
#
# dependencies:
# # Pip dependencies on PyPI
# python:
# - requests
# - gensim
#
# # Install packages with the system package manager
# # This searches for the provided executable and uses the package names
# system:
# # For simple packages, this is all that is necessary
# all: pianobar piano-dev
#
# # If the package has a certain name on a different platform:
# pkcon: pianobar libpiano-dev # For the mycroft platform
# apt-get: pianobar libpiano-dev # For Ubuntu/Debian
#
# # Require certain executables to be in the PATH for the install to succeed
# exes:
# - pianobar
#
# # Require the installation of other skills before installing this skill
# skill:
# - my-other-skill

View File

@ -0,0 +1,10 @@
skillMetadata:
sections:
- name: API Paths
fields:
- name: OSD_API
type: text
label: OSD API URL
value: "http://localhost:5050/send"
placeholder: "http://localhost:5050/send"