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

feat: singing #40

Merged
merged 11 commits into from
Jun 15, 2024
Merged

feat: singing #40

merged 11 commits into from
Jun 15, 2024

Conversation

mikejgray
Copy link
Collaborator

@mikejgray mikejgray commented Jun 10, 2024

When the voice is set to Alan Pope, whether via a Mimic plugin or Piper with alan-low or the default ovos-tts-plugin-server config, a request to sing will play the original Mimic voice songs from old Mycroft. If not, the assistant will say it's too shy to sing.

Also adds OCP/ovos-media compatibility for containerized environments. An internet connection to GitHub is required in that case, as the skill will send the GitHub raw file URL instead of the local file URL.

Closes #27
Closes #36

mikejgray added 6 commits June 9, 2024 23:34
If the environment variable is set indicating OVOS is running in a container, pass the GitHub URL of the file to OCP instead of the local URL. Naturally only works if the assistant has an internet connection to GitHub.
@goldyfruit
Copy link
Member

goldyfruit commented Jun 14, 2024

The skill doesn't always ask for confirmation and when it asked for confirmation, the yes can't be heard and generates the trace below.

alize:35 - ERROR - Error in STT plugin: ChromiumSTT
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]: Traceback (most recent call last):
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.12/site-packages/ovos_dinkum_listener/plugins.py", line 30, in finalize
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     transcript = self.engine.execute(audio, self.language)
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.12/site-packages/ovos_stt_plugin_chromium/__init__.py", line 248, in execute
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     data = json.loads(result)["result"]
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:            ^^^^^^^^^^^^^^^^^^
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     return _default_decoder.decode(s)
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/usr/lib/python3.12/json/decoder.py", line 337, in decode
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/usr/lib/python3.12/json/decoder.py", line 355, in raw_decode
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     raise JSONDecodeError("Expecting value", s, err.value) from None
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@JarbasAl
Copy link
Member

The skill doesn't always ask for confirmation when and when it asked for confirmation, the yes can't be heard and generates the trace below.

alize:35 - ERROR - Error in STT plugin: ChromiumSTT
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]: Traceback (most recent call last):
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.12/site-packages/ovos_dinkum_listener/plugins.py", line 30, in finalize
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     transcript = self.engine.execute(audio, self.language)
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.12/site-packages/ovos_stt_plugin_chromium/__init__.py", line 248, in execute
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     data = json.loads(result)["result"]
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:            ^^^^^^^^^^^^^^^^^^
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     return _default_decoder.decode(s)
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/usr/lib/python3.12/json/decoder.py", line 337, in decode
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/usr/lib/python3.12/json/decoder.py", line 355, in raw_decode
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     raise JSONDecodeError("Expecting value", s, err.value) from None
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

this was an issue with STT, are you on latest dinkum that solves that issue with short words? and on latest ovos-config? (to see if instant_listen and remove_silence is on)

@goldyfruit
Copy link
Member

The skill doesn't always ask for confirmation when and when it asked for confirmation, the yes can't be heard and generates the trace below.

alize:35 - ERROR - Error in STT plugin: ChromiumSTT
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]: Traceback (most recent call last):
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.12/site-packages/ovos_dinkum_listener/plugins.py", line 30, in finalize
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     transcript = self.engine.execute(audio, self.language)
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.12/site-packages/ovos_stt_plugin_chromium/__init__.py", line 248, in execute
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     data = json.loads(result)["result"]
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:            ^^^^^^^^^^^^^^^^^^
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     return _default_decoder.decode(s)
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/usr/lib/python3.12/json/decoder.py", line 337, in decode
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/usr/lib/python3.12/json/decoder.py", line 355, in raw_decode
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     raise JSONDecodeError("Expecting value", s, err.value) from None
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

this was an issue with STT, are you on latest dinkum that solves that issue with short words? and on latest ovos-config? (to see if instant_listen and remove_silence is on)

I was running version 0.0.3a42...

@mikejgray
Copy link
Collaborator Author

The skill doesn't always ask for confirmation when and when it asked for confirmation, the yes can't be heard and generates the trace below.

alize:35 - ERROR - Error in STT plugin: ChromiumSTT
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]: Traceback (most recent call last):
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.12/site-packages/ovos_dinkum_listener/plugins.py", line 30, in finalize
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     transcript = self.engine.execute(audio, self.language)
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.12/site-packages/ovos_stt_plugin_chromium/__init__.py", line 248, in execute
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     data = json.loads(result)["result"]
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:            ^^^^^^^^^^^^^^^^^^
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     return _default_decoder.decode(s)
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/usr/lib/python3.12/json/decoder.py", line 337, in decode
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:   File "/usr/lib/python3.12/json/decoder.py", line 355, in raw_decode
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]:     raise JSONDecodeError("Expecting value", s, err.value) from None
Jun 14 17:41:25 mark2 ovos-dinkum-listener[7277]: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

this was an issue with STT, are you on latest dinkum that solves that issue with short words? and on latest ovos-config? (to see if instant_listen and remove_silence is on)

I was running version 0.0.3a42...

0.3a43 is where it's fixed! But what do you mean it doesn't always ask for confirmation?

@mikejgray
Copy link
Collaborator Author

@goldyfruit I can't replicate the issue you mentioned. If you have details on that please open up an issue and I'll put in a bugfix

@mikejgray mikejgray merged commit b8c3cd7 into dev Jun 15, 2024
19 checks passed
@mikejgray mikejgray deleted the FEAT_Singing branch June 15, 2024 03:24
@github-actions github-actions bot mentioned this pull request Jul 5, 2024
mikejgray added a commit that referenced this pull request Jul 18, 2024
* Increment Version

* fix: correction to version.py

* fix: release automation (#20)

* fix: release automation

* fix: setup looks for correct version

* fix: adjust version location

* Increment Version to

* Update Changelog

* chore: versioning

* Increment Version to

* Update Changelog

* version

* Increment Version to

* Update Changelog

* Increment Version to

* fix: alpha release flow

* Increment Version to 0.1.2a1

* Update Changelog

* chore: Make README.md examples fit typical style (#22)

The prior copy looked out of place in the rest of the homescreen
examples, which are all capitalized and end in punctuation.

* Update skill.json

* more stt mistranscriptions for DukeNukemKeyword.voc (#26)

* Increment Version to 0.1.2a2

* Update Changelog

* update imports (#30)

* update imports

remove invalid license header, boilerplate copy paste from ancient times

I'm the original author, in case of doubt the GPL license in header does not apply

* Update skill.json

---------

Co-authored-by: JarbasAl <[email protected]>

* Increment Version to 0.1.2a3

* Update Changelog

* chore: standardize naming, move files to locale dir (#32)

* chore: standardize naming, move files to locale dir

* Increment Version to 0.1.2a4

* Update Changelog

* feat: portal ocp (#35)

* tests

* feat: glados mp3s to OCP playback

* use OCP API, stub and start writing tests

* Update skill.json

* rename unit test file

* broader coverage

* syntax

* remove 3.12 tests

resolves ModuleNotFoundError: No module named 'setuptools'

* remove errant todo

* remove unsupported use case

* remove confusing and unnecessary section from README

* Update skill.json

---------

Co-authored-by: mikejgray <[email protected]>

* Increment Version to 0.1.2a5

* Update Changelog

* feat: best in life (#34)

* feat: what is best in life?

* tests

* add resources

* drop explicit 3.7 support

Since this isn't a default skill anywhere, users must install it explicitly, so maintaining support for EOL Python doesn't make a ton of sense. Plus it's making the tests fail.

* Increment Version to 0.1.2a6

* Update Changelog

* feat: malibu stacey and bill and ted easter eggs (#37)

* feat: malibu stacey and bill and ted easter eggs
Addresses #28

* bump minerva version to ovos-workshop compat

* remove copyrighted sounds

* Increment Version to 0.1.2a7

* Update Changelog

* automations/translations

* translations/allow_UNUSED_keywords

* Increment Version to 0.1.2a8

* Update Changelog

* Re-enable intent tests (#39)

* Update skill.json

* feat: singing (#40)

* feat: singing skill port
Closes #2
* feat: container support

If the environment variable is set indicating OVOS is running in a container, pass the GitHub URL of the file to OCP instead of the local URL. Naturally only works if the assistant has an internet connection to GitHub.

Co-authored-by: mikejgray <[email protected]>

* Increment Version to 0.1.2a9

* Update Changelog

* feat: make it snow (#33)

* feat: snow on Christmas

* Increment Version to 0.1.2a10

* Update Changelog

* fix: laws of robotics (#43)

* fix: laws of robotics

Only one law at a time when requesting a specific law

* Increment Version to 0.1.2a11

* Update Changelog

* Increment Version to 1.0.0

---------

Co-authored-by: mikejgray <[email protected]>
Co-authored-by: Mike Gray <[email protected]>
Co-authored-by: AJ Jordan <[email protected]>
Co-authored-by: JarbasAI <[email protected]>
Co-authored-by: JarbasAl <[email protected]>
Co-authored-by: miro <[email protected]>
Co-authored-by: Daniel McKnight <[email protected]>
@mikejgray mikejgray mentioned this pull request Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Container compatibility voice specific easter egg - singing
3 participants