Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no more hard coded mp3 #28

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
settings.json

*.mp3

# python compiled files
*.pyc
__pycache__/
Expand Down
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# <img src='https://raw.githack.com/FortAwesome/Font-Awesome/master/svgs/solid/laugh-beam.svg' card_color='#22a7f0' width='50' height='50' style='vertical-align:bottom'/> Singing
Mycroft sings lyrics to some popular songs
Mycroft plays uploaded mp3

## About
Mycroft will speak the lyrics to a random pop music song using text to speech.
At the moment Mycroft plays mp3s uploaded in its souce directory.

## Examples
* "Sing"

## Supported languages
Danish
German
Greek
Spanish
French
Hungarian
Italian
Dutch
Portuguese
Romanian
Russian
Swedish
Turkish

## Credits
Mycroft AI (@MycroftAI)

Expand Down
14 changes: 5 additions & 9 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@


import random
from os.path import dirname, join
from glob import glob;
from os.path import dirname

from adapt.intent import IntentBuilder
from mycroft import MycroftSkill, intent_handler
Expand All @@ -28,14 +29,9 @@ class SingingSkill(MycroftSkill):
def __init__(self):
super(SingingSkill, self).__init__(name="SingingSkill")
self.process = None
self.play_list = {
0: join(dirname(__file__), "popey-favourite.mp3"),
1: join(dirname(__file__), "popey-jackson.mp3"),
2: join(dirname(__file__), "popey-jerusalem.mp3"),
3: join(dirname(__file__), "popey-lose-yourself.mp3"),
4: join(dirname(__file__), "popey-lovemetender.mp3"),
5: join(dirname(__file__), "popey-rocketman.mp3"),
}
mypath = dirname(__file__)
self.log.warning(mypath)
self.play_list = glob(mypath + '**/*.mp3')

def initialize(self):
self.audioservice = AudioService(self.bus)
Expand Down
6 changes: 3 additions & 3 deletions dialog/it-it/singing.dialog
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(Mi farebbe piacere|Sarei felice di) cantare per te.
Allora vado.
Sono un pò nervoso riguardo all mia voce, ma proviamo.
(É un piacere|Sono felice di) cantare per te.
Iniziamo.
Non so se ti piacerà la mia voce, ma proviamo.
3 changes: 1 addition & 2 deletions vocab/en-us/Sing.voc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
sing
sing me a song
sing (me|) (a song|a tail)
3 changes: 1 addition & 2 deletions vocab/it-it/Sing.voc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
canta
cantami una canzone
canta(mi|) (una canzone|una storia)