Commit Graph

4924 Commits (dev)

Author SHA1 Message Date
Åke afc9106fcb
Merge pull request #3165 from MycroftAI/not-maintained-notice
Add notice in readme that the project is no longer maintained
2024-09-03 22:17:49 +02:00
Åke Forslund a9844c3080 Readme: Remove "buttons" due to unmaintained status
Production ready, PRs welcome and join chat buttons removed.
2024-09-01 21:02:36 +02:00
Åke 05efd9fd5b Add notice in readme that the project is no longer maintained 2024-09-01 17:31:20 +02:00
Åke ab242a2c82
Handle multiple intents with the same name (#2921)
* Add check for duplicate adapt intents

There are two cases, duplicated named intent and duplicated anonymous intent.

A named intent will cause a ValueError exception notifying the skill
author that there is a collision.

An anonymous intent will silently derive a new name and use that
instead of the default generated one.

* Add tests for intent collisions

* Make enable/disable intent handle the new exception

The enable/disable intent did not mark an intent as detached, instead it
remained in the list of intents after disabling in the IntentServiceInterface
to be retrieved when the intent should be re-enabled.

This moves detached intents into a list of detached intents to so they
won't cause the double enable exception.

* Add move logic to find if intent is detached

MycroftSkill.enable_intent() will now check if the intent is detached
before trying to re-enable it.

* Lock updates of intents

This should avoid some race conditions that may occur if multiple
threads tries to enable / disable intents
2022-11-23 15:52:56 +09:30
Matthias Pfefferle 5f964f7d40 add german nose-word-list 2022-09-21 15:54:50 +09:30
Gaëtan Trellu 843909c328 Fix French language 2022-09-21 15:36:02 +09:30
Gaëtan Trellu 938092c77e Add French noise_words.list 2022-09-21 15:33:50 +09:30
amaciotta 6875bc9c19 Update yes.voc
Improvement italian translation.
2022-09-13 13:45:31 +09:30
Mike 1b67bf33e0
Improve help message and logging of dev_setup.sh (#3105)
* Improve help message and logging

* Fix stray formatting

* Create /var/log/mycroft at the start of execution

* Make sure sudo is available

* Move function found_exe up

* Explicitly call out setup completion

* Add -a flag to append rather than overwrite
2022-06-24 16:35:18 +09:30
Kris Gesling 48dd100f52 Relax pyyaml version requirement
This specific version was failing on Debian Bullseye installs.
Using the ~= operator allows for point release updates to this package.
2022-06-24 14:50:09 +09:30
Bart Ribbers 6af431375d
Don't install pulseaudio-dev on Alpine Linux systems (#3109)
* Prefix the Alpine Linux virtual package name with a dot

This way the package is easy to recognize when inspecting
/etc/apk/world, and it's actually a standard to do so for virtual
packages

* Put all Alpine Linux deps on seperate lines

This way you get cleaner git diffs, showing more clearly what is
changing when adding or removing something

* Don't install pulseaudio-dev on Alpine Linux systems

It doesn't actually seem to be required by any of the PyPi deps
2022-06-02 09:41:03 +09:30
Bart Ribbers 56ceb80179 {start,stop}-mycroft.sh: port to POSIX sh
This makes the start and stop scripts compatible with POSIX shells.

Overview of the changes:
- "function" statements removed, not necessary and incompatible
- dashes in function and variable names for lower ones (- to _)
- source statements changed for .
- double square brackets replaced for single ones
- double equal statements replaced for single ones
- &> (piping stdout and stderr to the same file) replaced for 2>&1 >
- sourcing of mycroft-skill-testrunner replaced with direct execution
with Bash
- replaced BASH_SOURCE with $0, these scripts are never sourced anyway
- replaced "echo -n" statements with "printf"
- merged the "" and "all" cases to a single one
2022-05-31 13:17:09 +09:30
Bart Ribbers dadbd23976 {start,stop}-mycroft.sh: fix shellcheck issues
ShellCheck is a static analysis tool for shell scripts with the goal to:
- point out and clarify typical beginner's syntax issues that cause a
shell to give cryptic error messages
- point out and clarify typical intermediate level semantic problems
that cause a shell to behave strangely and counter-intuitively
- point out subtle caveats, corner cases and pitfalls that may cause an
advanced user's otherwise working script to fail under future
circumstances

I've ran this tool over both start-mycroft.sh and stop-mycroft.sh and
fixed any issue that popped up
2022-05-31 13:17:09 +09:30
Åke a909fc8f19
Requirements: remove pychromecast (#3098) 2022-04-22 07:17:56 +09:30
Kris Gesling f030b7e165
Silence file does not exist error when clearing VK files (#3093)
When clearing VK test files - if some files didn't exist (because they weren't created) the bare rm command will report an error that the files didn't exist. We don't care, only that they are removed if they did exist.
2022-04-20 10:23:48 +09:30
Åke bf85e5c9c5
Remove the chromecast audio backend (#3097)
The pychromecast module is quite outdated and I think the backend would
fit better as a plugin now.
2022-04-20 07:01:30 +09:30
Åke 3d64aa5940
dev_setup: Give packages in separate args to pacman (#3094)
This makes sure the packages aren't clumped together into a single
argument when using pacman to install packages for arch linux.
2022-04-08 10:28:56 +09:30
Kris Gesling 28d512e54c
Fix shellcheck error on Arch install command (#3092)
Double quote to prevent globbing
2022-04-07 15:45:10 +09:30
Khionu Sybiern 2d15fca581
Add pipewire check for Arch installs (#3091)
Check if pipewire-pulse is installed, installs pulse otherwise

==== Fixed Issues ====
Partial fix: #2980

====  Tech Notes ====
pipewire-pulse is a compat layer, providing a pulseaudio API
2022-04-07 14:45:06 +09:30
Åke c6f7c1ad0a
Shellcheck scripts in root folder (#3090)
* Fix Shellcheck: Add -r flag to read

read will mangle backslashes without it. These are not expected
characters so not explicitly necessary, but also won't hurt.

* Fix Shellcheck SC2086: Double quote variables

* Fix Shellcheck SC2004: dollar sign unnecessary on arithmetic vars

* Fix Shellcheck SC2129: use curly braces to >> file

* Disable shellcheck on sourced venv/bin/activate

* Fix Shellcheck SC1004

Simplify sed-expression to be a single line only removing the need for
the offending / and linefeed

* Fix Shellcheck SC2046 when finding repo root

Splits the check into to files to be able to quote the expressions
in a good way.

* Fix Shellcheck SC2086 Unquoted apt packagaes

This converts the variable APT_PACKAGE_LIST from a string to an array.
This is a safer way to handle arguments according to BashFAQ
(http://mywiki.wooledge.org/BashFAQ/050)

* Fix Shellcheck SC2230 by changing which to command -v

* CICD: Activate shellcheck job for dev_setup.sh

* Shellcheck start-mycroft.sh

This fixes the following shellcheck issues:
- https://www.shellcheck.net/wiki/SC2164 -- Use 'cd ... || exit' or 'cd ... |...
- https://www.shellcheck.net/wiki/SC2206 -- Quote to prevent word splitting/g...
- https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
- https://www.shellcheck.net/wiki/SC2124 -- Assigning an array to a string! A...

The command is added to the CICD run of shellcheck

* Shellcheck stop-mycroft.sh

Fixes the following issues:
- https://www.shellcheck.net/wiki/SC2164 -- Use 'cd ... || exit' or 'cd ... |...
- https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

The file is now automatically checked by the CICD job

* Shellcheck venv-activate.sh

Fix the following shellcheck issues:
- https://www.shellcheck.net/wiki/SC2068 -- Double quote array expansions to ...
- https://www.shellcheck.net/wiki/SC2145 -- Argument mixes string and array. ...
- https://www.shellcheck.net/wiki/SC2128 -- Expanding an array without an ind...
- https://www.shellcheck.net/wiki/SC2139 -- This expands when defined, not wh...
- https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ...

The help for invalid arg now works when the faulty argument isn't the
first argument

Co-authored-by: Kris Gesling <kris.gesling@mycroft.ai>
2022-04-07 14:21:26 +09:30
fsa317 ccd577bbf4
Issue-3006 replaced hot_words with hotwords to correctly lookup configuration (#3088) 2022-03-23 11:24:38 +09:30
Kris Gesling 536ea7e9b5
Remove skills dir symlink on --clean (#3086)
* Remove skills dir symlink on --clean

* Add note on --clean about files not removed
2022-03-22 15:47:43 +09:30
Åke 5f4c68e583
Don't overwrite invalid json in config (#2881)
* Separate tests of LocalConf into new test class

* Do not overwrite configs with malformed json

If a config file is loaded and is invalid saves to that file will not be
possible until it's manually restored. The store accepts a force flag to
override this protection.

The method returns True if the store succeeded so call sites can
verbally report the issue as well.
2022-03-07 10:03:10 +09:30
Åke 660b7b9bd3
Merge pull request #3082 from MycroftAI/refactor/python-detect
Send python version detection output to /dev/null
2022-03-02 08:33:42 +01:00
Kris Gesling b583cbbf7e Send python version detection output to /dev/null 2022-03-02 12:14:53 +09:30
Åke e7ddd51256
TTS playback queue singleton (#3055)
* fix issues when remote excepts out

* Remove explicit clear_cache from MimicTTS

* Updates for using singleton TTS playback thread

- Cache is called on all tts's registered as using the thread
- Begin audio and end audio is handled by the playback thread
- Further changes from self.playback to TTS.playback for consistency

* Remove redundant try/except

* Consolidate general and TTS-specific sentence splitting

This performs all sentence-splitting at the same stage. This fixes a
subtle issue where a TTS splits a sentence into chunks and throws an
error on only one of those chunks. The fallback would generate a
sentence for the original un-chunked sentence. possibly saying the same
parts twice.

This also pre-compiles the regexes used to speed things up a bit.

Co-authored-by: Ken <ken.smith@mycroft.ai>
2022-03-02 09:59:57 +09:30
Kris Gesling 36620af703
Remove inflection dependency (#3031)
The dependency was being used for a single string operation that is easily
replaced.
2022-03-01 07:46:21 +09:30
Kris Gesling f0eecc93e1
Bump requests to remove GPL from dependency tree (#3081)
Versions prior to 2.26.0 used a GPL licensed package Chardet.
This has been replaced with charset_normalizer (MIT license).
2022-03-01 07:44:54 +09:30
Åke 012d5a517c
Merge pull request #3080 from MycroftAI/bugfix/pip-install
Fix pip url for Python > 3.6
2022-02-28 21:54:32 +01:00
Daniel McKnight eb97bb339e
Add `supported_languages` parameter to STT and TTS base classes (#3059)
* Add `supported_languages` parameter to STT and TTS base classes

* Refactor `supported_languages` to `available_languages` and updated docstring to be more precise
2022-02-28 15:36:48 +09:30
Åke dd7f7abba6
Shellcheck scripts folder (#3063)
* Remove unused scripts

install-pocketsphinx and install-pygtk is no longer used by the
dev-setup.

* Fix shellcheck issues in scripts

* Remove space in cores argument

* Update my-info.sh script

- Make it use the new method to activate venv if needed
- Improve requirements.txt parsing
- Update process detection from old "screen" setup
- Update log-files paths
- Fix finding mycroft-core folder

* Fix shellcheck issues in mycroft-use.sh

Mainly quoting but also unpacking of arguments and improving some if
statements

* Update shellcheck test to include scripts folder
2022-02-28 14:44:15 +09:30
Kris Gesling df0b8fe212 Remove mplayer audioservice
It is no longer supported by the projects maintainer.
2022-02-28 14:43:10 +09:30
Kris Gesling 909d89e28e Fix pip url for Python > 3.6 2022-02-28 14:35:23 +09:30
Åke Forslund 8ee3e8d640 Add noise_words.list for Swedish 2022-02-24 10:22:57 +09:30
Åke Forslund e1731f53ec Remove unused imports from common_query_skill.py 2022-02-24 10:22:09 +09:30
Åke Forslund 3fa99f288f Handle missing noise words file in CQS
This treats a None result from resolve_resource_file() as a FileNotFound
exception.
2022-02-24 10:22:09 +09:30
luca-vercelli 4791114609
missing initial value (#3061)
Condition

    if [ $disable_precise_later == true ]; 

gives a syntax error if variable is not initialized
2022-02-24 10:21:17 +09:30
Kris Gesling 953cc53e13
Merge pull request #3060 from kleo/dev
Use double bracket for shell conditional
2022-02-24 10:17:11 +09:30
Kris Gesling 99ac12cbf8
Merge pull request #3068 from forslund/bugfix/vk-dialogfile-from-sentence
Voight kampff: Bugfix dialogfile from sentence
2022-02-23 16:44:33 +09:30
TheRealDGD 34f66d234c
Added duration_to_bytes to FileMockMicrophone (#3071)
* Added duration_to_bytes to FileMockMicrophone

Added duration_to_bytes to fix AttributeError: 'FileMockMicrophone' object has no attribute 'duration_to_bytes'
in call from mycroft-core/mycroft/client/speech/mic.py _wait_until_wake_word

* Update wake_word_test.py

Fixed formatting issues

* Update wake_word_test.py

Fixed formatting

* Remove whitespaces for PEP8

Co-authored-by: Kris Gesling <kris.gesling@mycroft.ai>
2022-02-23 16:08:46 +09:30
Kris Gesling f556f84412
Add phonetic spellings for IP and Wikipedia (#3023)
Co-authored-by: jarbasal <jarbasai@mailfence.com>
2022-02-23 15:42:16 +09:30
Kris Gesling 1ae6900b26
Remove ResponsiveVoice TTS module from core (#3049)
This module in its current format does not work due to API changes.
There is also a community built plugin that is now described in our
documentation.
2022-02-23 15:40:53 +09:30
Aditya Mehra 5d88eb3a33
Fix: show text delegate as per autofit label refactor (#3065)
* fix show text delegate as per autofit label refactor

* Make rectangle containing text transparent

For different background colors, the background on the card should be set.

Co-authored-by: Kris Gesling <kris.gesling@mycroft.ai>
2022-02-23 15:31:19 +09:30
Kris Gesling 0dadc9ba07
Switch CLA Checker to new credentials (#3077) 2022-02-23 14:47:03 +09:30
Åke a487f66958
Select the proper get-pip url for Python 3.6 (#3073)
The bootstrap script no longer supports Python 3.6, instead it
recommends python 3.6 users to use an alternative url.
2022-02-14 15:10:24 +09:30
Åke Forslund f8aa77c8e7 VK simplify dialog matching
This uses the existing dialog renderer and the standard format library
to in two steps create a regex where the {elements} in a dialog is
replaced with ".*" to match the given sentence.
2022-01-28 21:48:25 +01:00
Åke Forslund a3fd830cb0 VK: Expand the parentheses from dialog files 2022-01-26 20:09:12 +01:00
Åke Forslund 825b3879a5 VK: Fix regex used in _match_dialog_patterns
A redundant step caused issue when performing tests in the tv-remove-control-skill
2022-01-25 07:15:31 +01:00
Åke Forslund 03ef7f4b21 VK: Include locale folders in dialog_from_sentence
Only dialog folder was used previously this adds globbing through the
locale/lang/ folder and it's subfolders
2022-01-25 07:15:31 +01:00
Kleo Bercero 6d66b800dc Use double bracket 2022-01-01 19:49:36 +08:00