Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f4992e310 | |||
| 8245155fab |
+4
-12
@@ -1,26 +1,18 @@
|
||||
.git/
|
||||
.venv/
|
||||
node_modules/
|
||||
__pycache__/
|
||||
test/
|
||||
tools/
|
||||
etc/test/
|
||||
download/precise-engine/
|
||||
download/kaldi/
|
||||
opt/
|
||||
|
||||
etc/homeassistant/config/.storage
|
||||
examples/typical/home-assistant/config/.storage
|
||||
examples/typical-intent/home-assistant/config/.storage
|
||||
examples/client-server/home-assistant/config/.storage
|
||||
examples/mqtt-hermes/home-assistant/config/.storage
|
||||
|
||||
profiles/*/base_dictionary.txt
|
||||
profiles/*/base_language_model.txt
|
||||
profiles/*/acoustic_model/
|
||||
profiles/*/g2p.fst
|
||||
base_dictionary.txt
|
||||
base_language_model.txt
|
||||
acoustic_model/
|
||||
|
||||
profiles/en-kaldi/
|
||||
profiles/en-zamia/
|
||||
|
||||
profiles/*/download/
|
||||
profiles/*/download/
|
||||
+1
-22
@@ -4,7 +4,6 @@ __pycache__/
|
||||
.venv/
|
||||
.ipynb_checkpoints/
|
||||
download/
|
||||
build/
|
||||
|
||||
# QEMU
|
||||
etc/qemu-arm-static
|
||||
@@ -27,11 +26,6 @@ profiles/*/*.umdl
|
||||
profiles/*/flair/
|
||||
profiles/*/*.pb
|
||||
profiles/*/*.pb.params
|
||||
profiles/*/snowboy/
|
||||
profiles/*/precise/
|
||||
profiles/*/porcupine/
|
||||
.doit.db
|
||||
vocab.txt
|
||||
|
||||
adapt_config.json
|
||||
tagged_sentences.md
|
||||
@@ -47,11 +41,6 @@ grammars/
|
||||
sentences/
|
||||
record/
|
||||
|
||||
# Tools
|
||||
tools/dist/
|
||||
tools/etc/
|
||||
opt/
|
||||
|
||||
# Third party
|
||||
etc/*.tar.gz
|
||||
etc/*.tar.xz
|
||||
@@ -64,15 +53,5 @@ tts/
|
||||
*.log
|
||||
.HA_VERSION
|
||||
|
||||
# Tests
|
||||
etc/test/pt/Google/
|
||||
etc/test/pt/PT*
|
||||
etc/test/pt/original/
|
||||
etc/test/vi/2*
|
||||
|
||||
# Misc
|
||||
workbench.xmi
|
||||
|
||||
# Debian
|
||||
site/
|
||||
debian/rhasspy-server*
|
||||
workbench.xmi
|
||||
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Michael Hansen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -22,7 +22,7 @@ docker-armhf:
|
||||
-t synesthesiam/rhasspy-server:armhf
|
||||
|
||||
docker-aarch64:
|
||||
docker build . -f docker/templates/dockerfiles/Dockerfile.prebuilt.alsa.all \
|
||||
docker build . -f docker/templates/dockerfiles/Dockerfile.from-source.alsa.all \
|
||||
--build-arg BUILD_ARCH=aarch64 \
|
||||
--build-arg CPU_ARCH=arm64v8 \
|
||||
--build-arg BUILD_FROM=arm64v8/ubuntu:bionic \
|
||||
@@ -49,9 +49,6 @@ manifest:
|
||||
|
||||
web-dist:
|
||||
yarn build
|
||||
mkdir -p download
|
||||
rm -f download/rhasspy-web-dist.tar.gz
|
||||
tar -czf download/rhasspy-web-dist.tar.gz dist/
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Documentation
|
||||
@@ -76,10 +73,3 @@ g2p: $(G2P_MODELS)
|
||||
|
||||
%/g2p.fst: %/base_dictionary.txt
|
||||
./make-g2p.sh $< $@
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Testing
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
mypy:
|
||||
mypy app.py rhasspy
|
||||
|
||||
@@ -7,7 +7,7 @@ Rhasspy (pronounced RAH-SPEE) is an offline, [multilingual](#supported-languages
|
||||
* [Hass.IO Add-On Repository](https://github.com/synesthesiam/hassio-addons)
|
||||
* [Discussion](https://community.home-assistant.io/t/rhasspy-offline-voice-assistant-toolkit/60862)
|
||||
|
||||
Rhasspy transca voice commands into [JSON](https://json.org) events that can trigger actions in home automation software, like [Home Assistant automations](https://www.home-assistant.io/docs/automation/trigger/#event-trigger) or [Node-RED flows](https://rhasspy.readthedocs.io/en/latest/usage/#node-red). You define custom voice commands in a [profile](https://rhasspy.readthedocs.io/en/latest/profiles/) using a [specialized template syntax](https://rhasspy.readthedocs.io/en/latest/training/#sentencesini), and Rhasspy takes care of the rest.
|
||||
Rhasspy transforms voice commands into [JSON](https://json.org) events that can trigger actions in home automation software, like [Home Assistant automations](https://www.home-assistant.io/docs/automation/trigger/#event-trigger) or [Node-RED flows](https://rhasspy.readthedocs.io/en/latest/usage/#node-red). You define custom voice commands in a [profile](profiles.md) using a [specialized template syntax](https://rhasspy.readthedocs.io/en/latest/training/#sentencesini), and Rhasspy takes care of the rest.
|
||||
|
||||
To run Rhasspy with the English (en) profile using Docker:
|
||||
|
||||
@@ -38,29 +38,26 @@ Rhasspy currently supports the following languages:
|
||||
* Mandarin (`zh`)
|
||||
* Vietnamese (`vi`)
|
||||
* Portuguese (`pt`)
|
||||
* Swedish (`sv`)
|
||||
* Catalan (`ca`)
|
||||
|
||||
The table below summarizes language support across the various supporting technologies that Rhasspy uses:
|
||||
|
||||
| Category | Name | Offline? | en | de | es | fr | it | nl | ru | el | hi | zh | vi | pt | sv | ca |
|
||||
| -------- | ------ | -------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |
|
||||
| **Wake Word** | [pocketsphinx](https://rhasspy.readthedocs.io/en/latest/wake-word/#pocketsphinx) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | | ✓ |
|
||||
| | [porcupine](https://rhasspy.readthedocs.io/en/latest/wake-word.md#porcupine) | ✓ | ✓ | | | | | | | | | | | | | |
|
||||
| | [snowboy](https://rhasspy.readthedocs.io/en/latest/wake-word/#snowboy) | *requires account* | ✓ | • | • | • | • | • | • | • | • | • | • | • | • | • |
|
||||
| | [precise](https://rhasspy.readthedocs.io/en/latest/wake-word/#mycroft-precise) | ✓ | ✓ | • | • | • | • | • | • | • | • | • | • | • | • | • |
|
||||
| **Speech to Text** | [pocketsphinx](https://rhasspy.readthedocs.io/en/latest/speech-to-text/#pocketsphinx) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | | ✓ |
|
||||
| | [kaldi](https://rhasspy.readthedocs.io/en/latest/speech-to-text/#kaldi) | ✓ | | | | | | | | | | | ✓ | | ✓ | |
|
||||
| **Intent Recognition** | [fsticuffs](https://rhasspy.readthedocs.io/en/latest/intent-recognition/#fsticuffs) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [fuzzywuzzy](https://rhasspy.readthedocs.io/en/latest/intent-recognition/#fuzzywuzzy) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [adapt](https://rhasspy.readthedocs.io/en/latest/intent-recognition/#mycroft-adapt) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [flair](https://rhasspy.readthedocs.io/en/latest/intent-recognition/#flair) | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | | | | | | ✓ | | ✓ |
|
||||
| | [rasaNLU](https://rhasspy.readthedocs.io/en/latest/intent-recognition/#rasanlu) | *needs extra software* | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| **Text to Speech** | [espeak](https://rhasspy.readthedocs.io/en/latest/text-to-speech/#espeak) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [flite](https://rhasspy.readthedocs.io/en/latest/text-to-speech/#flite) | ✓ | ✓ | | | | | | | | ✓ | | | | | |
|
||||
| | [picotts](https://rhasspy.readthedocs.io/en/latest/text-to-speech/#picotts) | ✓ | ✓ | | | | | | | | | | | | | |
|
||||
| | [marytts](https://rhasspy.readthedocs.io/en/latest/text-to-speech/#marytts) | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ | | | | | | | |
|
||||
| | [wavenet](https://rhasspy.readthedocs.io/en/latest/text-to-speech/#google-wavenet) | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ | ✓ | |
|
||||
| Category | Name | Offline? | en | de | es | fr | it | nl | ru | el | hi | zh | vi | pt |
|
||||
| -------- | ------ | -------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |
|
||||
| **Wake Word** | [pocketsphinx](https://rhasspy.readthedocs.io/en/latest/wake-word/#pocketsphinx) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||
| | [snowboy](https://rhasspy.readthedocs.io/en/latest/wake-word/#snowboy) | *requires account* | ✓ | • | • | • | • | • | • | • | • | • | • | • |
|
||||
| | [precise](https://rhasspy.readthedocs.io/en/latest/wake-word/#mycroft-precise) | ✓ | ✓ | • | • | • | • | • | • | • | • | • | • | • |
|
||||
| **Speech to Text** | [pocketsphinx](https://rhasspy.readthedocs.io/en/latest/speech-to-text/#pocketsphinx) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||
| | [kaldi](https://rhasspy.readthedocs.io/en/latest/speech-to-text/#kaldi) | ✓ | | | | | | | | | | | ✓ | ✓ |
|
||||
| **Intent Recognition** | [fsticuffs](https://rhasspy.readthedocs.io/en/latest/intent-recognition/#fsticuffs) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [fuzzywuzzy](https://rhasspy.readthedocs.io/en/latest/intent-recognition/#fuzzywuzzy) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [adapt](https://rhasspy.readthedocs.io/en/latest/intent-recognition/#mycroft-adapt) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [flair](https://rhasspy.readthedocs.io/en/latest/intent-recognition/#flair) | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | | | | | | ✓ |
|
||||
| | [rasaNLU](https://rhasspy.readthedocs.io/en/latest/intent-recognition/#rasanlu) | *needs extra software* | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| **Text to Speech** | [espeak](https://rhasspy.readthedocs.io/en/latest/text-to-speech/#espeak) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [flite](https://rhasspy.readthedocs.io/en/latest/text-to-speech/#flite) | ✓ | ✓ | | | | | | | | ✓ | | | |
|
||||
| | [picotts](https://rhasspy.readthedocs.io/en/latest/text-to-speech/#picotts) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [marytts](https://rhasspy.readthedocs.io/en/latest/text-to-speech/#marytts) | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ | | | | | |
|
||||
| | [wavenet](https://rhasspy.readthedocs.io/en/latest/text-to-speech/#google-wavenet) | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ |
|
||||
|
||||
• - yes, but requires training/customization
|
||||
|
||||
|
||||
@@ -28,8 +28,6 @@ def main():
|
||||
"hin": "hi",
|
||||
"ell": "el",
|
||||
"por": "pt",
|
||||
"swe": "sv",
|
||||
"cat": "ca",
|
||||
}
|
||||
|
||||
for language in languages:
|
||||
|
||||
@@ -29,7 +29,7 @@ def main():
|
||||
if len(line) == 0:
|
||||
continue
|
||||
|
||||
parts = re.split(r"[\t ]+", line)
|
||||
parts = re.split(r"[ ]+", line)
|
||||
word = parts[0]
|
||||
|
||||
if "(" in word:
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ def main():
|
||||
if len(line) == 0:
|
||||
continue
|
||||
|
||||
parts = re.split(r"[\t ]+", line)
|
||||
parts = re.split(r"[ ]+", line)
|
||||
word = parts[0].lower()
|
||||
|
||||
if ("(" in word) or (word in freq_phonemes):
|
||||
|
||||
+5
-20
@@ -1,29 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# Directory of *this* script
|
||||
this_dir="$( cd "$( dirname "$0" )" && pwd )"
|
||||
DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||
|
||||
venv="${this_dir}/../.venv"
|
||||
if [[ ! -d "${venv}" ]]; then
|
||||
echo "Missing virtual environment at ${venv}"
|
||||
echo "Did you run create-venv.sh?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source "${venv}/bin/activate"
|
||||
|
||||
# Force .venv/lib to be used
|
||||
export LD_LIBRARY_PATH="${venv}/lib:${LD_LIBRARY_PATH}"
|
||||
|
||||
# Use local Kaldi
|
||||
if [[ -d "${this_dir}/opt/kaldi" ]]; then
|
||||
export KALDI_PREFIX="${this_dir}/opt"
|
||||
fi
|
||||
cd "$DIR/.."
|
||||
source .venv/bin/activate
|
||||
|
||||
# Path to sphinxtrain tools
|
||||
if [[ -d "/usr/lib/sphinxtrain" ]]; then
|
||||
export PATH="/usr/lib/sphinxtrain:${PATH}"
|
||||
export PATH="/usr/lib/sphinxtrain:$PATH"
|
||||
fi
|
||||
|
||||
cd "${this_dir}/.." && python3 -m rhasspy "$@"
|
||||
python3 -m rhasspy "$@"
|
||||
|
||||
+164
-221
@@ -1,149 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
this_dir="$( cd "$( dirname "$0" )" && pwd )"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Command-line Arguments
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
. "${this_dir}/etc/shflags"
|
||||
|
||||
DEFINE_string 'venv' "${this_dir}/.venv" 'Path to create virtual environment'
|
||||
DEFINE_string 'download-dir' "${this_dir}/download" 'Directory to cache downloaded files'
|
||||
DEFINE_boolean 'system' true 'Install system dependencies'
|
||||
DEFINE_boolean 'flair' false 'Install flair'
|
||||
DEFINE_boolean 'precise' false 'Install Mycroft Precise'
|
||||
DEFINE_boolean 'adapt' true 'Install Mycroft Adapt'
|
||||
DEFINE_boolean 'google' false 'Install Google Text to Speech'
|
||||
DEFINE_boolean 'kaldi' true 'Install Kaldi'
|
||||
DEFINE_boolean 'offline' false "Don't download anything"
|
||||
DEFINE_integer 'make-threads' 4 'Number of threads to use with make' 'j'
|
||||
|
||||
FLAGS "$@" || exit $?
|
||||
eval set -- "${FLAGS_ARGV}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Default Settings
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
set -e
|
||||
|
||||
venv="${FLAGS_venv}"
|
||||
download_dir="${FLAGS_download_dir}"
|
||||
# Directory of *this* script
|
||||
DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||
|
||||
# Place where downloaded artifacts are stored
|
||||
download_dir="${DIR}/download"
|
||||
mkdir -p "${download_dir}"
|
||||
|
||||
if [[ "${FLAGS_system}" -eq "${FLAGS_FALSE}" ]]; then
|
||||
no_system='true'
|
||||
fi
|
||||
|
||||
if [[ "${FLAGS_flair}" -eq "${FLAGS_FALSE}" ]]; then
|
||||
no_flair='true'
|
||||
fi
|
||||
|
||||
if [[ "${FLAGS_precise}" -eq "${FLAGS_FALSE}" ]]; then
|
||||
no_precise='true'
|
||||
fi
|
||||
|
||||
if [[ "${FLAGS_adapt}" -eq "${FLAGS_FALSE}" ]]; then
|
||||
no_adapt='true'
|
||||
fi
|
||||
|
||||
if [[ "${FLAGS_kaldi}" -eq "${FLAGS_FALSE}" ]]; then
|
||||
no_kaldi='true'
|
||||
fi
|
||||
|
||||
if [[ "${FLAGS_google}" -eq "${FLAGS_FALSE}" ]]; then
|
||||
no_google='true'
|
||||
fi
|
||||
|
||||
if [[ "${FLAGS_offline}" -eq "${FLAGS_TRUE}" ]]; then
|
||||
offline='true'
|
||||
fi
|
||||
|
||||
make_threads="${FLAGS_make_threads}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Create a temporary directory for building stuff
|
||||
temp_dir="$(mktemp -d)"
|
||||
|
||||
function cleanup {
|
||||
rm -rf "${temp_dir}"
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
function maybe_download {
|
||||
if [[ ! -f "$2" ]]; then
|
||||
if [[ ! -z "${offline}" ]]; then
|
||||
echo "Need to download $1 but offline."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "$(dirname "$2")"
|
||||
curl -sSfL -o "$2" "$1"
|
||||
echo "$1 => $2"
|
||||
fi
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Debian dependencies
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
if [[ -z "${no_system}" ]]; then
|
||||
echo "Installing system dependencies"
|
||||
sudo apt-get update
|
||||
sudo apt-get install --no-install-recommends --yes \
|
||||
python3 python3-pip python3-venv python3-dev \
|
||||
python \
|
||||
build-essential autoconf autoconf-archive libtool automake bison \
|
||||
sox espeak flite swig portaudio19-dev \
|
||||
libatlas-base-dev \
|
||||
gfortran \
|
||||
sphinxbase-utils sphinxtrain pocketsphinx \
|
||||
jq checkinstall unzip xz-utils \
|
||||
curl
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Python >= 3.6
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
if [[ ! -z "$(which python3.8)" ]]; then
|
||||
PYTHON='python3.8'
|
||||
elif [[ ! -z "$(which python3.7)" ]]; then
|
||||
PYTHON='python3.7'
|
||||
elif [[ ! -z "$(which python3.6)" ]]; then
|
||||
PYTHON='python3.6'
|
||||
else
|
||||
echo "Installing Python 3.6 from source. This is going to take a LONG time."
|
||||
sudo apt-get install --no-install-recommends --yes \
|
||||
tk-dev libncurses5-dev libncursesw5-dev \
|
||||
libreadline6-dev libdb5.3-dev libgdbm-dev \
|
||||
libsqlite3-dev libssl-dev libbz2-dev \
|
||||
libexpat1-dev liblzma-dev zlib1g-dev
|
||||
|
||||
python_file="${download_dir}/Python-3.6.8.tar.xz"
|
||||
python_url='https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz'
|
||||
maybe_download "${python_url}" "${python_file}"
|
||||
|
||||
tar -C "${temp_dir}" -xf "${python_file}"
|
||||
cd "${temp_dir}/Python-3.6.8" && \
|
||||
./configure && \
|
||||
make -j "${make_threads}" && \
|
||||
sudo make altinstall
|
||||
|
||||
PYTHON='python3.6'
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Download dependencies
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# CPU architecture
|
||||
CPU_ARCH="$(uname --m)"
|
||||
case "${CPU_ARCH}" in
|
||||
CPU_ARCH="$(lscpu | awk '/^Architecture/{print $2}')"
|
||||
case $CPU_ARCH in
|
||||
x86_64)
|
||||
FRIENDLY_ARCH=amd64
|
||||
;;
|
||||
@@ -157,90 +24,113 @@ case "${CPU_ARCH}" in
|
||||
;;
|
||||
esac
|
||||
|
||||
# Create a temporary directory for building stuff
|
||||
temp_dir="$(mktemp -d)"
|
||||
|
||||
function cleanup {
|
||||
rm -rf "${temp_dir}"
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Debian dependencies
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
echo "Installing system dependencies (${FRIENDLY_ARCH})"
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python3 python3-pip python3-venv python3-dev \
|
||||
python \
|
||||
build-essential autoconf autoconf-archive libtool automake bison \
|
||||
sox espeak flite swig portaudio19-dev \
|
||||
libatlas-base-dev \
|
||||
gfortran \
|
||||
sphinxbase-utils sphinxtrain pocketsphinx \
|
||||
jq checkinstall unzip xz-utils \
|
||||
curl
|
||||
|
||||
# Download dependencies
|
||||
echo "Downloading dependencies"
|
||||
download_args=()
|
||||
if [[ ! -z "${offline}" ]]; then
|
||||
download_args+=('--offline')
|
||||
fi
|
||||
bash download-dependencies.sh
|
||||
|
||||
if [[ ! -z "${no_precise}" ]]; then
|
||||
download_args+=('--noprecise')
|
||||
fi
|
||||
# -----------------------------------------------------------------------------
|
||||
# OpenFST
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
if [[ ! -z "${no_kaldi}" ]]; then
|
||||
download_args+=('--nokaldi')
|
||||
fi
|
||||
case $CPU_ARCH in
|
||||
armv7l|arm64v8)
|
||||
# Build from source
|
||||
openfst_file="${download_dir}/openfst-1.6.2.tar.gz"
|
||||
echo "Building OpenFST (${openfst_file})"
|
||||
tar -C "${temp_dir}" -xzf "${openfst_file}" && \
|
||||
cd "${temp_dir}/openfst-1.6.2" && \
|
||||
./configure --enable-static --enable-shared --enable-far --enable-ngram-fsts && \
|
||||
make -j 4 && \
|
||||
sudo make install
|
||||
;;
|
||||
|
||||
bash download-dependencies.sh "${download_args[@]}"
|
||||
*)
|
||||
# Use pre-built packages
|
||||
sudo apt-get install -y libfst-dev libfst-tools
|
||||
esac
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Python 3.6
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
if [[ -z "$(which python3.6)" ]]; then
|
||||
echo "Installing Python 3.6 from source. This is going to take a LONG time."
|
||||
sudo apt-get install -y tk-dev libncurses5-dev libncursesw5-dev \
|
||||
libreadline6-dev libdb5.3-dev libgdbm-dev \
|
||||
libsqlite3-dev libssl-dev libbz2-dev \
|
||||
libexpat1-dev liblzma-dev zlib1g-dev
|
||||
|
||||
python_file="${download_dir}/Python-3.6.8.tar.xz"
|
||||
if [[ ! -f "${python_file}" ]]; then
|
||||
python_url='https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz'
|
||||
curl -sSfL-o "${python_file}" "${python_url}"
|
||||
fi
|
||||
|
||||
tar -C "${temp_dir}" -xf "${python_file}"
|
||||
cd "${temp_dir}/Python-3.6.8" && \
|
||||
./configure && \
|
||||
make -j 4 && \
|
||||
sudo make altinstall
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Virtual environment
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
cd "${this_dir}"
|
||||
cd "${DIR}"
|
||||
|
||||
echo "${venv}"
|
||||
PYTHON="python3.6"
|
||||
VENV_PATH="${DIR}/.venv"
|
||||
echo "${VENV_PATH}"
|
||||
|
||||
if [[ -d "${venv}" ]]; then
|
||||
echo "Removing existing virtual environment"
|
||||
rm -rf "${venv}"
|
||||
fi
|
||||
echo "Removing existing virtual environment"
|
||||
rm -rf "${VENV_PATH}"
|
||||
|
||||
echo "Creating new virtual environment"
|
||||
mkdir -p "${venv}"
|
||||
"${PYTHON}" -m venv "${venv}"
|
||||
|
||||
# Extract Rhasspy tools
|
||||
rhasspy_tools_file="${download_dir}/rhasspy-tools_${FRIENDLY_ARCH}.tar.gz"
|
||||
echo "Extracting tools (${rhasspy_tools_file})"
|
||||
tar -C "${venv}" -xf "${rhasspy_tools_file}"
|
||||
|
||||
# Force .venv/lib to be used
|
||||
export LD_LIBRARY_PATH="${venv}/lib:${LD_LIBRARY_PATH}"
|
||||
mkdir -p "${VENV_PATH}"
|
||||
"${PYTHON}" -m venv "${VENV_PATH}"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
source "${venv}/bin/activate"
|
||||
source "${VENV_PATH}/bin/activate"
|
||||
"${PYTHON}" -m pip install wheel
|
||||
|
||||
echo "Installing Python requirements"
|
||||
"${PYTHON}" -m pip install wheel setuptools
|
||||
"${PYTHON}" -m pip install requests
|
||||
|
||||
# pytorch is not available on ARM
|
||||
case "${CPU_ARCH}" in
|
||||
case $CPU_ARCH in
|
||||
armv7l|arm64v8)
|
||||
no_flair="true" ;;
|
||||
# Exclude flair
|
||||
grep -v flair requirements.txt > "${temp_dir}/requirements-noflair.txt"
|
||||
"${PYTHON}" -m pip install -r "${temp_dir}/requirements-noflair.txt"
|
||||
;;
|
||||
|
||||
*)
|
||||
# Install all requirements
|
||||
"${PYTHON}" -m pip install -r requirements.txt
|
||||
esac
|
||||
|
||||
requirements_file="${temp_dir}/requirements.txt"
|
||||
cp "${this_dir}/requirements.txt" "${requirements_file}"
|
||||
|
||||
# Exclude requirements
|
||||
if [[ ! -z "${no_flair}" ]]; then
|
||||
echo "Excluding flair from virtual environment"
|
||||
sed -i '/^flair/d' "${requirements_file}"
|
||||
fi
|
||||
|
||||
if [[ ! -z "${no_precise}" ]]; then
|
||||
echo "Excluding Mycroft Precise from virtual environment"
|
||||
sed -i '/^precise-runner/d' "${requirements_file}"
|
||||
fi
|
||||
|
||||
if [[ ! -z "${no_adapt}" ]]; then
|
||||
echo "Excluding Mycroft Adapt from virtual environment"
|
||||
sed -i '/^adapt-parser/d' "${requirements_file}"
|
||||
fi
|
||||
|
||||
if [[ ! -z "${no_google}" ]]; then
|
||||
echo "Excluding Google Text to Speech from virtual environment"
|
||||
sed -i '/^google-cloud-texttospeech/d' "${requirements_file}"
|
||||
fi
|
||||
|
||||
"${PYTHON}" -m pip install \
|
||||
--global-option=build_ext \
|
||||
--global-option="-I${venv}/include" \
|
||||
--global-option="-L${venv}/lib" \
|
||||
-r "${requirements_file}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Pocketsphinx for Python
|
||||
# -----------------------------------------------------------------------------
|
||||
@@ -252,9 +142,15 @@ pocketsphinx_file="${download_dir}/pocketsphinx-python.tar.gz"
|
||||
# Snowboy
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
case "${CPU_ARCH}" in
|
||||
case $CPU_ARCH in
|
||||
x86_64|armv7l)
|
||||
snowboy_file="${download_dir}/snowboy-1.3.0.tar.gz"
|
||||
if [[ ! -f "${snowboy_file}" ]]; then
|
||||
snowboy_url='https://github.com/Kitt-AI/snowboy/archive/v1.3.0.tar.gz'
|
||||
echo "Downloading snowboy (${snowboy_url})"
|
||||
curl -sSfL-o "${snowboy_file}" "${snowboy_url}"
|
||||
fi
|
||||
|
||||
"${PYTHON}" -m pip install "${snowboy_file}"
|
||||
;;
|
||||
|
||||
@@ -266,14 +162,13 @@ esac
|
||||
# Mycroft Precise
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
if [[ -z "${no_precise}" && -z "$(which precise-engine)" ]]; then
|
||||
case "${CPU_ARCH}" in
|
||||
if [[ -z "$(which precise-engine)" ]]; then
|
||||
case $CPU_ARCH in
|
||||
x86_64|armv7l)
|
||||
echo "Installing Mycroft Precise"
|
||||
precise_file="${download_dir}/precise-engine_0.3.0_${CPU_ARCH}.tar.gz"
|
||||
precise_install="${venv}/lib"
|
||||
tar -C "${precise_install}" -xf "${precise_file}"
|
||||
ln -s "${precise_install}/precise-engine/precise-engine" "${venv}/bin/precise-engine"
|
||||
precise_install='/usr/lib'
|
||||
sudo tar -C "${precise_install}" -xf "${precise_file}"
|
||||
sudo ln -s "${precise_install}/precise-engine/precise-engine" '/usr/bin/precise-engine'
|
||||
;;
|
||||
|
||||
*)
|
||||
@@ -282,23 +177,71 @@ if [[ -z "${no_precise}" && -z "$(which precise-engine)" ]]; then
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Kaldi
|
||||
# Opengrm
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
if [[ -z "${no_kaldi}" ]]; then
|
||||
kaldi_file="${download_dir}/kaldi_${FRIENDLY_ARCH}.tar.gz"
|
||||
echo "Installing Kaldi (${kaldi_file})"
|
||||
mkdir -p "${this_dir}/opt"
|
||||
tar -C "${this_dir}/opt" -xf "${kaldi_file}"
|
||||
if [[ -z "$(which ngramcount)" ]]; then
|
||||
opengrm_file="${download_dir}/opengrm-ngram-1.3.3.tar.gz"
|
||||
echo "Building Opengrm ${opengrm_file}"
|
||||
tar -C "${temp_dir}" -xf "${opengrm_file}" && \
|
||||
cd "${temp_dir}/opengrm-ngram-1.3.3" && \
|
||||
./configure && \
|
||||
make -j 4 && \
|
||||
sudo make install && \
|
||||
sudo ldconfig
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Phonetisaurus
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
if [[ -z "$(which phonetisaurus-apply)" ]]; then
|
||||
case $CPU_ARCH in
|
||||
x86_64|armv7l|arm64v8)
|
||||
# Install pre-built package
|
||||
phonetisaurus_file="${download_dir}/phonetisaurus-2019_${FRIENDLY_ARCH}.deb"
|
||||
echo "Installing phonetisaurus (${phonetisaurus_file})"
|
||||
sudo dpkg -i "${phonetisaurus_file}"
|
||||
;;
|
||||
|
||||
*)
|
||||
# Build from source
|
||||
phonetisaurus_file="${download_dir}/phonetisaurus-2019.zip"
|
||||
echo "Building phonetisaurus (${phonetisaurus_file})"
|
||||
unzip -d "${temp_dir}" "${phonetisaurus_file}" && \
|
||||
cd "${temp_dir}/phonetisaurus" && \
|
||||
./configure && \
|
||||
make -j 4 && \
|
||||
sudo make install
|
||||
esac
|
||||
fi
|
||||
|
||||
# Add /usr/local/lib to LD_LIBRARY_PATH
|
||||
sudo ldconfig
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# NodeJS / Yarn
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
if [[ -z "$(which node)" ]]; then
|
||||
echo "Installing nodejs"
|
||||
sudo apt-get install -y nodejs
|
||||
fi
|
||||
|
||||
if [[ -z "$(which yarn)" ]]; then
|
||||
echo "Installing yarn"
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash
|
||||
|
||||
# Need to re-source .bashrc so yarn is in the path
|
||||
source "${HOME}/.bashrc"
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Web Interface
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
rhasspy_web_file="${download_dir}/rhasspy-web-dist.tar.gz"
|
||||
echo "Extracting web interface (${rhasspy_web_file})"
|
||||
tar -C "${this_dir}" -xf "${rhasspy_web_file}"
|
||||
echo "Building web interface"
|
||||
cd "${DIR}" && yarn && yarn build
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
Package: rhasspy-server
|
||||
Version: 2.4.8
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Depends: sox,alsa-utils,espeak,libstdc++6,jq,xz-utils,unzip,curl,sphinxbase-utils,sphinxtrain,flite,libatlas-base-dev,gfortran
|
||||
Architecture: ${architecture}
|
||||
Maintainer: Michael Hansen
|
||||
Description: Offline voice assistant
|
||||
Vendored
-11
@@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ -z "${RHASSPY_BASE_DIR}" ]]; then
|
||||
export RHASSPY_BASE_DIR="/usr/lib/rhasspy"
|
||||
fi
|
||||
|
||||
if [[ -z "${KALDI_PREFIX}" ]]; then
|
||||
export KALDI_PREFIX="${RHASSPY_BASE_DIR}"
|
||||
fi
|
||||
|
||||
cd "${RHASSPY_BASE_DIR}" && rhasspy/rhasspy "$@"
|
||||
-177
@@ -1,177 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
rhasspy_version="2.4.8"
|
||||
|
||||
this_dir="$( cd "$( dirname "$0" )" && pwd )"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Command-line Arguments
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
. "${this_dir}/etc/shflags"
|
||||
|
||||
DEFINE_string 'architecture' '' 'Debian architecture'
|
||||
DEFINE_string 'version' "${rhasspy_version}" 'Package version'
|
||||
DEFINE_boolean 'package' true 'Create debian package (.deb)'
|
||||
|
||||
FLAGS "$@" || exit $?
|
||||
eval set -- "${FLAGS_ARGV}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Settings
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
export architecture="${FLAGS_architecture}"
|
||||
version="${FLAGS_version}"
|
||||
debian_dir="${this_dir}/debian"
|
||||
|
||||
set -e
|
||||
|
||||
if [[ -z "${architecture}" ]]; then
|
||||
# Guess architecture
|
||||
architecture="$(dpkg-architecture | grep 'DEB_BUILD_ARCH=' | sed 's/^[^=]\+=//')"
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Activate virtual environment
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
venv="${this_dir}/.venv"
|
||||
|
||||
if [[ ! -d "${venv}" ]]; then
|
||||
echo "Missing virtual environment at ${venv}"
|
||||
echo "Did you run create-venv.sh?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "${this_dir}"
|
||||
source "${venv}/bin/activate"
|
||||
|
||||
if [[ -z "$(which pyinstaller)" ]]; then
|
||||
echo "Missing PyInstaller"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Run PyInstaller
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
echo "Running PyInstaller"
|
||||
package_name="rhasspy-server_${version}_${architecture}"
|
||||
package_dir="${debian_dir}/${package_name}"
|
||||
output_dir="${package_dir}/usr/lib/rhasspy"
|
||||
share_dir="${package_dir}/usr/share/rhasspy"
|
||||
|
||||
pyinstaller\
|
||||
-y \
|
||||
--workpath "pyinstaller/build" \
|
||||
--distpath "${output_dir}" \
|
||||
"${this_dir}/rhasspy.spec"
|
||||
|
||||
# Remove all symbols (Liantian warning)
|
||||
strip --strip-all "${output_dir}/rhasspy"/*.so* || true
|
||||
|
||||
# Remove executable bit from shared libs (Lintian warning)
|
||||
chmod -x "${output_dir}/rhasspy"/*.so* || true
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Copy Rhasspy
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Profiles
|
||||
mkdir -p "${output_dir}/profiles"
|
||||
rsync -av \
|
||||
--delete \
|
||||
--exclude 'acoustic_model' \
|
||||
--exclude 'download' \
|
||||
--exclude 'flair' \
|
||||
--exclude 'base_dictionary.txt' \
|
||||
--exclude 'base_language_model.txt' \
|
||||
--exclude 'g2p.fst' \
|
||||
--exclude 'HCLG.fst' \
|
||||
--exclude 'final.mdl' \
|
||||
--exclude '*.umdl' \
|
||||
"${this_dir}/profiles/" \
|
||||
"${output_dir}/profiles/"
|
||||
|
||||
# Sounds
|
||||
mkdir -p "${output_dir}/etc/wav"
|
||||
rsync -av \
|
||||
--delete \
|
||||
"${this_dir}/etc/wav/" \
|
||||
"${output_dir}/etc/wav/"
|
||||
|
||||
# Web
|
||||
mkdir -p "${output_dir}/dist"
|
||||
rsync -av \
|
||||
--delete \
|
||||
"${this_dir}/dist/" \
|
||||
"${output_dir}/dist/"
|
||||
|
||||
# Documentation
|
||||
mkdocs build
|
||||
mkdir -p "${share_dir}/docs"
|
||||
rsync -av \
|
||||
--delete \
|
||||
"${this_dir}/site/" \
|
||||
"${share_dir}/docs/"
|
||||
|
||||
# Source code
|
||||
mkdir -p "${share_dir}/src"
|
||||
rsync -av \
|
||||
--delete \
|
||||
--exclude '.mypy_cache' \
|
||||
--exclude '__pycache__' \
|
||||
"${this_dir}/rhasspy/" \
|
||||
"${share_dir}/src/rhasspy/"
|
||||
|
||||
cp "${this_dir}/app.py" "${share_dir}/src/"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Copy Kaldi
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
echo "Copying Kaldi"
|
||||
kaldi_src="${venv}/kaldi"
|
||||
if [[ ! -d "${kaldi_src}" ]]; then
|
||||
echo "Missing Kaldi at ${kaldi_src}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
kaldi_dest="${output_dir}/kaldi"
|
||||
mkdir -p "${kaldi_dest}"
|
||||
rsync -av --delete "${kaldi_src}/" "${kaldi_dest}/"
|
||||
|
||||
# Avoid link recursion
|
||||
rm -f "${kaldi_dest}/egs/wsj/s5/utils/utils"
|
||||
|
||||
# Turn duplicate .so files into symbolic links
|
||||
function fix_library_links() {
|
||||
lib_dir="$1"
|
||||
|
||||
for lib in "${lib_dir}"/*.so; do
|
||||
lib_base="$(basename ${lib})"
|
||||
for lib_link in "${lib_dir}/${lib_base}".*; do
|
||||
rm -f "${lib_link}"
|
||||
ln -s "${lib_base}" "${lib_link}"
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
fix_library_links "${kaldi_dest}/tools/openfst/lib"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Create Debian package
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
echo "Creating Debian package"
|
||||
mkdir -p "${package_dir}/DEBIAN"
|
||||
cat "${debian_dir}/DEBIAN/control" | \
|
||||
envsubst > "${package_dir}/DEBIAN/control"
|
||||
|
||||
mkdir -p "${package_dir}/usr/bin"
|
||||
cp "${debian_dir}/bin/rhasspy-server" "${package_dir}/usr/bin/"
|
||||
|
||||
if [[ "${FLAGS_package}" -eq "${FLAGS_TRUE}" ]]; then
|
||||
# Actually build the package
|
||||
cd 'debian' && fakeroot dpkg --build "${package_name}"
|
||||
fi
|
||||
@@ -14,7 +14,9 @@ QEMU
|
||||
|
||||
SYSTEM_DEPENDENCIES
|
||||
|
||||
RHASSPY_TOOLS
|
||||
PHONETISAURUS
|
||||
|
||||
OPENGRM
|
||||
|
||||
PYTHON_REQUIREMENTS
|
||||
|
||||
@@ -22,6 +24,8 @@ PYTHON_POCKETSPHINX
|
||||
|
||||
SNOWBOY
|
||||
|
||||
MYCROFT_PRECISE
|
||||
|
||||
TTS
|
||||
|
||||
KALDI
|
||||
@@ -32,8 +36,6 @@ RUN ldconfig
|
||||
RUN find / -name bw -exec cp '{}' /usr/bin/ \;
|
||||
RUN find / -name mllr_solve -exec cp '{}' /usr/bin/ \;
|
||||
|
||||
GSTREAMER
|
||||
|
||||
PULSEAUDIO
|
||||
|
||||
# Copy script to run
|
||||
@@ -47,6 +49,5 @@ PROFILES
|
||||
RHASSPY_CODE
|
||||
|
||||
ENV CONFIG_PATH /data/options.json
|
||||
ENV KALDI_PREFIX /opt
|
||||
|
||||
ENTRYPOINT ["/run.sh"]
|
||||
@@ -1,5 +1,7 @@
|
||||
COPY profiles/zh/profile.json \
|
||||
profiles/zh/custom_words.txt \
|
||||
profiles/zh/download-profile.sh \
|
||||
profiles/zh/check-profile.sh \
|
||||
profiles/zh/espeak_phonemes.txt \
|
||||
profiles/zh/phoneme_examples.txt \
|
||||
profiles/zh/frequent_words.txt \
|
||||
@@ -9,6 +11,8 @@ COPY profiles/zh/profile.json \
|
||||
COPY profiles/hi/ \
|
||||
profiles/hi/profile.json \
|
||||
profiles/hi/custom_words.txt \
|
||||
profiles/hi/download-profile.sh \
|
||||
profiles/hi/check-profile.sh \
|
||||
profiles/hi/espeak_phonemes.txt \
|
||||
profiles/hi/phoneme_examples.txt \
|
||||
profiles/hi/frequent_words.txt \
|
||||
@@ -17,6 +21,8 @@ COPY profiles/hi/ \
|
||||
|
||||
COPY profiles/el/profile.json \
|
||||
profiles/el/custom_words.txt \
|
||||
profiles/el/download-profile.sh \
|
||||
profiles/el/check-profile.sh \
|
||||
profiles/el/espeak_phonemes.txt \
|
||||
profiles/el/phoneme_examples.txt \
|
||||
profiles/el/frequent_words.txt \
|
||||
@@ -25,19 +31,18 @@ COPY profiles/el/profile.json \
|
||||
|
||||
COPY profiles/de/profile.json \
|
||||
profiles/de/custom_words.txt \
|
||||
profiles/de/download-profile.sh \
|
||||
profiles/de/check-profile.sh \
|
||||
profiles/de/espeak_phonemes.txt \
|
||||
profiles/de/phoneme_examples.txt \
|
||||
profiles/de/frequent_words.txt \
|
||||
profiles/de/sentences.ini \
|
||||
profiles/de/stop_words.txt ${RHASSPY_APP}/profiles/de/
|
||||
|
||||
COPY profiles/de/kaldi/custom_words.txt \
|
||||
profiles/de/kaldi/espeak_phonemes.txt \
|
||||
profiles/de/kaldi/phoneme_examples.txt \
|
||||
${RHASSPY_APP}/profiles/de/kaldi/
|
||||
|
||||
COPY profiles/it/profile.json \
|
||||
profiles/it/custom_words.txt \
|
||||
profiles/it/download-profile.sh \
|
||||
profiles/it/check-profile.sh \
|
||||
profiles/it/espeak_phonemes.txt \
|
||||
profiles/it/phoneme_examples.txt \
|
||||
profiles/it/frequent_words.txt \
|
||||
@@ -46,6 +51,8 @@ COPY profiles/it/profile.json \
|
||||
|
||||
COPY profiles/es/profile.json \
|
||||
profiles/es/custom_words.txt \
|
||||
profiles/es/download-profile.sh \
|
||||
profiles/es/check-profile.sh \
|
||||
profiles/es/espeak_phonemes.txt \
|
||||
profiles/es/phoneme_examples.txt \
|
||||
profiles/es/frequent_words.txt \
|
||||
@@ -54,6 +61,8 @@ COPY profiles/es/profile.json \
|
||||
|
||||
COPY profiles/fr/profile.json \
|
||||
profiles/fr/custom_words.txt \
|
||||
profiles/fr/download-profile.sh \
|
||||
profiles/fr/check-profile.sh \
|
||||
profiles/fr/espeak_phonemes.txt \
|
||||
profiles/fr/phoneme_examples.txt \
|
||||
profiles/fr/frequent_words.txt \
|
||||
@@ -62,6 +71,8 @@ COPY profiles/fr/profile.json \
|
||||
|
||||
COPY profiles/ru/profile.json \
|
||||
profiles/ru/custom_words.txt \
|
||||
profiles/ru/download-profile.sh \
|
||||
profiles/ru/check-profile.sh \
|
||||
profiles/ru/espeak_phonemes.txt \
|
||||
profiles/ru/phoneme_examples.txt \
|
||||
profiles/ru/frequent_words.txt \
|
||||
@@ -70,19 +81,18 @@ COPY profiles/ru/profile.json \
|
||||
|
||||
COPY profiles/nl/profile.json \
|
||||
profiles/nl/custom_words.txt \
|
||||
profiles/nl/download-profile.sh \
|
||||
profiles/nl/check-profile.sh \
|
||||
profiles/nl/espeak_phonemes.txt \
|
||||
profiles/nl/phoneme_examples.txt \
|
||||
profiles/nl/frequent_words.txt \
|
||||
profiles/nl/sentences.ini \
|
||||
profiles/nl/stop_words.txt ${RHASSPY_APP}/profiles/nl/
|
||||
|
||||
COPY profiles/nl/kaldi/custom_words.txt \
|
||||
profiles/nl/kaldi/espeak_phonemes.txt \
|
||||
profiles/nl/kaldi/phoneme_examples.txt \
|
||||
${RHASSPY_APP}/profiles/nl/kaldi/
|
||||
|
||||
COPY profiles/vi/profile.json \
|
||||
profiles/vi/custom_words.txt \
|
||||
profiles/vi/download-profile.sh \
|
||||
profiles/vi/check-profile.sh \
|
||||
profiles/vi/espeak_phonemes.txt \
|
||||
profiles/vi/phoneme_examples.txt \
|
||||
profiles/vi/frequent_words.txt \
|
||||
@@ -91,37 +101,20 @@ COPY profiles/vi/profile.json \
|
||||
|
||||
COPY profiles/pt/profile.json \
|
||||
profiles/pt/custom_words.txt \
|
||||
profiles/pt/download-profile.sh \
|
||||
profiles/pt/check-profile.sh \
|
||||
profiles/pt/espeak_phonemes.txt \
|
||||
profiles/pt/phoneme_examples.txt \
|
||||
profiles/pt/frequent_words.txt \
|
||||
profiles/pt/sentences.ini \
|
||||
profiles/pt/stop_words.txt ${RHASSPY_APP}/profiles/pt/
|
||||
|
||||
COPY profiles/sv/profile.json \
|
||||
profiles/sv/custom_words.txt \
|
||||
profiles/sv/espeak_phonemes.txt \
|
||||
profiles/sv/phoneme_examples.txt \
|
||||
profiles/sv/frequent_words.txt \
|
||||
profiles/sv/sentences.ini \
|
||||
profiles/sv/stop_words.txt ${RHASSPY_APP}/profiles/sv/
|
||||
|
||||
COPY profiles/ca/profile.json \
|
||||
profiles/ca/custom_words.txt \
|
||||
profiles/ca/espeak_phonemes.txt \
|
||||
profiles/ca/phoneme_examples.txt \
|
||||
profiles/ca/frequent_words.txt \
|
||||
profiles/ca/sentences.ini \
|
||||
profiles/ca/stop_words.txt ${RHASSPY_APP}/profiles/ca/
|
||||
|
||||
COPY profiles/en/profile.json \
|
||||
profiles/en/custom_words.txt \
|
||||
profiles/en/download-profile.sh \
|
||||
profiles/en/check-profile.sh \
|
||||
profiles/en/espeak_phonemes.txt \
|
||||
profiles/en/phoneme_examples.txt \
|
||||
profiles/en/frequent_words.txt \
|
||||
profiles/en/sentences.ini \
|
||||
profiles/en/stop_words.txt ${RHASSPY_APP}/profiles/en/
|
||||
|
||||
COPY profiles/en/kaldi/custom_words.txt \
|
||||
profiles/en/kaldi/espeak_phonemes.txt \
|
||||
profiles/en/kaldi/phoneme_examples.txt \
|
||||
${RHASSPY_APP}/profiles/en/kaldi/
|
||||
|
||||
@@ -14,30 +14,48 @@ COPY etc/qemu-arm-static /usr/bin/
|
||||
COPY etc/qemu-aarch64-static /usr/bin/
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends --yes \
|
||||
bash jq unzip \
|
||||
python3 python3-pip python3-dev \
|
||||
build-essential portaudio19-dev swig \
|
||||
libatlas-base-dev \
|
||||
sox espeak flite alsa-utils \
|
||||
git curl \
|
||||
autoconf libtool automake bison \
|
||||
sphinxbase-utils sphinxtrain
|
||||
apt-get install -y bash jq unzip \
|
||||
python3 python3-pip python3-dev \
|
||||
build-essential portaudio19-dev swig \
|
||||
libatlas-base-dev \
|
||||
sox espeak flite alsa-utils \
|
||||
git curl \
|
||||
autoconf libtool automake bison \
|
||||
sphinxbase-utils sphinxtrain
|
||||
|
||||
COPY download/openfst-1.6.2-1_${BUILD_ARCH}.deb /
|
||||
RUN if [ "$BUILD_ARCH" != "aarch64" ]; then \
|
||||
apt-get install --no-install-recommends --yes libfst-dev libfst-tools; \
|
||||
apt-get install -y libfst-dev libfst-tools; \
|
||||
else \
|
||||
dpkg -i /openfst-1.6.2-1_${BUILD_ARCH}.deb; \
|
||||
rm /openfst*.deb; \
|
||||
fi
|
||||
|
||||
RHASSPY_TOOLS
|
||||
COPY download/phonetisaurus-2019.tar.gz /phonetisaurus.tar.gz
|
||||
RUN cd / && tar -xf phonetisaurus.tar.gz
|
||||
RUN cd /phonetisaurus && \
|
||||
./configure && \
|
||||
make -j $MAKE_THREADS && \
|
||||
make install && \
|
||||
rm -rf /phonetisaurus*
|
||||
|
||||
# Install Opengrm
|
||||
COPY download/opengrm-ngram-1.3.3.tar.gz /
|
||||
RUN cd / && tar -xf opengrm-ngram-1.3.3.tar.gz && \
|
||||
cd opengrm-ngram-1.3.3 && \
|
||||
./configure && \
|
||||
make -j $MAKE_THREADS && \
|
||||
make install && \
|
||||
ldconfig && \
|
||||
rm -rf /opengrm*
|
||||
|
||||
# Install Python dependencies
|
||||
RUN python3 -m pip install --no-cache-dir setuptools wheel
|
||||
RUN python3 -m pip install --no-cache-dir wheel
|
||||
|
||||
RUN apt-get install -y libfreetype6-dev libpng-dev pkg-config libffi-dev libssl-dev
|
||||
COPY download/jsgf2fst-0.1.0.tar.gz \
|
||||
/download/
|
||||
|
||||
RUN apt-get install -y libfreetype6-dev libpng-dev pkg-config
|
||||
COPY requirements.txt /requirements.txt
|
||||
RUN if [ "$BUILD_ARCH" != "amd64" ]; then \
|
||||
grep -v flair /requirements.txt > /requirements-noflair.txt; \
|
||||
@@ -54,7 +72,15 @@ RUN python3 -m pip install --no-cache-dir /pocketsphinx-python.tar.gz && \
|
||||
COPY download/snowboy-1.3.0.tar.gz /
|
||||
RUN if [ "$BUILD_ARCH" != "aarch64" ]; then pip3 install --no-cache-dir /snowboy-1.3.0.tar.gz; fi
|
||||
|
||||
RUN apt-get install --no-install-recommends --yes flite libttspico-utils
|
||||
# Install Mycroft Precise
|
||||
COPY download/precise-engine_0.3.0_${CPU_ARCH}.tar.gz /precise-engine.tar.gz
|
||||
RUN if [ "$BUILD_ARCH" != "aarch64" ]; then \
|
||||
cd / && tar -xzf /precise-engine.tar.gz && \
|
||||
ln -s /precise-engine/precise-engine /usr/bin/precise-engine && \
|
||||
rm /precise-engine.tar.gz; \
|
||||
fi
|
||||
|
||||
RUN apt-get install -y flite libttspico-utils
|
||||
|
||||
COPY download/kaldi_${BUILD_ARCH}.tar.gz /kaldi.tar.gz
|
||||
RUN mkdir -p /opt && \
|
||||
@@ -67,9 +93,6 @@ RUN ldconfig
|
||||
RUN find / -name bw -exec cp '{}' /usr/bin/ \;
|
||||
RUN find / -name mllr_solve -exec cp '{}' /usr/bin/ \;
|
||||
|
||||
# Install gstreamer and plugins
|
||||
RUN apt-get install --no-install-recommends --yes gstreamer1.0-tools gstreamer1.0-plugins-good
|
||||
|
||||
ENV RHASSPY_APP /usr/share/rhasspy
|
||||
|
||||
# Copy script to run
|
||||
@@ -80,6 +103,8 @@ RUN chmod +x /run.sh
|
||||
|
||||
COPY profiles/zh/profile.json \
|
||||
profiles/zh/custom_words.txt \
|
||||
profiles/zh/download-profile.sh \
|
||||
profiles/zh/check-profile.sh \
|
||||
profiles/zh/espeak_phonemes.txt \
|
||||
profiles/zh/phoneme_examples.txt \
|
||||
profiles/zh/frequent_words.txt \
|
||||
@@ -89,6 +114,8 @@ COPY profiles/zh/profile.json \
|
||||
COPY profiles/hi/ \
|
||||
profiles/hi/profile.json \
|
||||
profiles/hi/custom_words.txt \
|
||||
profiles/hi/download-profile.sh \
|
||||
profiles/hi/check-profile.sh \
|
||||
profiles/hi/espeak_phonemes.txt \
|
||||
profiles/hi/phoneme_examples.txt \
|
||||
profiles/hi/frequent_words.txt \
|
||||
@@ -97,6 +124,8 @@ COPY profiles/hi/ \
|
||||
|
||||
COPY profiles/el/profile.json \
|
||||
profiles/el/custom_words.txt \
|
||||
profiles/el/download-profile.sh \
|
||||
profiles/el/check-profile.sh \
|
||||
profiles/el/espeak_phonemes.txt \
|
||||
profiles/el/phoneme_examples.txt \
|
||||
profiles/el/frequent_words.txt \
|
||||
@@ -105,6 +134,8 @@ COPY profiles/el/profile.json \
|
||||
|
||||
COPY profiles/de/profile.json \
|
||||
profiles/de/custom_words.txt \
|
||||
profiles/de/download-profile.sh \
|
||||
profiles/de/check-profile.sh \
|
||||
profiles/de/espeak_phonemes.txt \
|
||||
profiles/de/phoneme_examples.txt \
|
||||
profiles/de/frequent_words.txt \
|
||||
@@ -113,6 +144,8 @@ COPY profiles/de/profile.json \
|
||||
|
||||
COPY profiles/it/profile.json \
|
||||
profiles/it/custom_words.txt \
|
||||
profiles/it/download-profile.sh \
|
||||
profiles/it/check-profile.sh \
|
||||
profiles/it/espeak_phonemes.txt \
|
||||
profiles/it/phoneme_examples.txt \
|
||||
profiles/it/frequent_words.txt \
|
||||
@@ -121,6 +154,8 @@ COPY profiles/it/profile.json \
|
||||
|
||||
COPY profiles/es/profile.json \
|
||||
profiles/es/custom_words.txt \
|
||||
profiles/es/download-profile.sh \
|
||||
profiles/es/check-profile.sh \
|
||||
profiles/es/espeak_phonemes.txt \
|
||||
profiles/es/phoneme_examples.txt \
|
||||
profiles/es/frequent_words.txt \
|
||||
@@ -129,6 +164,8 @@ COPY profiles/es/profile.json \
|
||||
|
||||
COPY profiles/fr/profile.json \
|
||||
profiles/fr/custom_words.txt \
|
||||
profiles/fr/download-profile.sh \
|
||||
profiles/fr/check-profile.sh \
|
||||
profiles/fr/espeak_phonemes.txt \
|
||||
profiles/fr/phoneme_examples.txt \
|
||||
profiles/fr/frequent_words.txt \
|
||||
@@ -137,6 +174,8 @@ COPY profiles/fr/profile.json \
|
||||
|
||||
COPY profiles/ru/profile.json \
|
||||
profiles/ru/custom_words.txt \
|
||||
profiles/ru/download-profile.sh \
|
||||
profiles/ru/check-profile.sh \
|
||||
profiles/ru/espeak_phonemes.txt \
|
||||
profiles/ru/phoneme_examples.txt \
|
||||
profiles/ru/frequent_words.txt \
|
||||
@@ -145,6 +184,8 @@ COPY profiles/ru/profile.json \
|
||||
|
||||
COPY profiles/nl/profile.json \
|
||||
profiles/nl/custom_words.txt \
|
||||
profiles/nl/download-profile.sh \
|
||||
profiles/nl/check-profile.sh \
|
||||
profiles/nl/espeak_phonemes.txt \
|
||||
profiles/nl/phoneme_examples.txt \
|
||||
profiles/nl/frequent_words.txt \
|
||||
@@ -153,6 +194,8 @@ COPY profiles/nl/profile.json \
|
||||
|
||||
COPY profiles/vi/profile.json \
|
||||
profiles/vi/custom_words.txt \
|
||||
profiles/vi/download-profile.sh \
|
||||
profiles/vi/check-profile.sh \
|
||||
profiles/vi/espeak_phonemes.txt \
|
||||
profiles/vi/phoneme_examples.txt \
|
||||
profiles/vi/frequent_words.txt \
|
||||
@@ -161,30 +204,18 @@ COPY profiles/vi/profile.json \
|
||||
|
||||
COPY profiles/pt/profile.json \
|
||||
profiles/pt/custom_words.txt \
|
||||
profiles/pt/download-profile.sh \
|
||||
profiles/pt/check-profile.sh \
|
||||
profiles/pt/espeak_phonemes.txt \
|
||||
profiles/pt/phoneme_examples.txt \
|
||||
profiles/pt/frequent_words.txt \
|
||||
profiles/pt/sentences.ini \
|
||||
profiles/pt/stop_words.txt ${RHASSPY_APP}/profiles/pt/
|
||||
|
||||
COPY profiles/sv/profile.json \
|
||||
profiles/sv/custom_words.txt \
|
||||
profiles/sv/espeak_phonemes.txt \
|
||||
profiles/sv/phoneme_examples.txt \
|
||||
profiles/sv/frequent_words.txt \
|
||||
profiles/sv/sentences.ini \
|
||||
profiles/sv/stop_words.txt ${RHASSPY_APP}/profiles/sv/
|
||||
|
||||
COPY profiles/ca/profile.json \
|
||||
profiles/ca/custom_words.txt \
|
||||
profiles/ca/espeak_phonemes.txt \
|
||||
profiles/ca/phoneme_examples.txt \
|
||||
profiles/ca/frequent_words.txt \
|
||||
profiles/ca/sentences.ini \
|
||||
profiles/ca/stop_words.txt ${RHASSPY_APP}/profiles/ca/
|
||||
|
||||
COPY profiles/en/profile.json \
|
||||
profiles/en/custom_words.txt \
|
||||
profiles/en/download-profile.sh \
|
||||
profiles/en/check-profile.sh \
|
||||
profiles/en/espeak_phonemes.txt \
|
||||
profiles/en/phoneme_examples.txt \
|
||||
profiles/en/frequent_words.txt \
|
||||
@@ -196,12 +227,9 @@ COPY docker/rhasspy ${RHASSPY_APP}/bin/
|
||||
COPY dist/ ${RHASSPY_APP}/dist/
|
||||
COPY etc/wav/* ${RHASSPY_APP}/etc/wav/
|
||||
COPY rhasspy/profile_schema.json ${RHASSPY_APP}/rhasspy/
|
||||
COPY rhasspy/train/jsgf2fst/*.py ${RHASSPY_APP}/rhasspy/train/jsgf2fst/
|
||||
COPY rhasspy/train/*.py ${RHASSPY_APP}/rhasspy/train/
|
||||
COPY *.py ${RHASSPY_APP}/
|
||||
COPY rhasspy/*.py ${RHASSPY_APP}/rhasspy/
|
||||
|
||||
ENV CONFIG_PATH /data/options.json
|
||||
ENV KALDI_PREFIX /opt
|
||||
|
||||
ENTRYPOINT ["/run.sh"]
|
||||
@@ -14,30 +14,48 @@ COPY etc/qemu-arm-static /usr/bin/
|
||||
COPY etc/qemu-aarch64-static /usr/bin/
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends --yes \
|
||||
bash jq unzip \
|
||||
python3 python3-pip python3-dev \
|
||||
build-essential portaudio19-dev swig \
|
||||
libatlas-base-dev \
|
||||
sox espeak flite alsa-utils \
|
||||
git curl \
|
||||
autoconf libtool automake bison \
|
||||
sphinxbase-utils sphinxtrain
|
||||
apt-get install -y bash jq unzip \
|
||||
python3 python3-pip python3-dev \
|
||||
build-essential portaudio19-dev swig \
|
||||
libatlas-base-dev \
|
||||
sox espeak flite alsa-utils \
|
||||
git curl \
|
||||
autoconf libtool automake bison \
|
||||
sphinxbase-utils sphinxtrain
|
||||
|
||||
COPY download/openfst-1.6.2-1_${BUILD_ARCH}.deb /
|
||||
RUN if [ "$BUILD_ARCH" != "aarch64" ]; then \
|
||||
apt-get install --no-install-recommends --yes libfst-dev libfst-tools; \
|
||||
apt-get install -y libfst-dev libfst-tools; \
|
||||
else \
|
||||
dpkg -i /openfst-1.6.2-1_${BUILD_ARCH}.deb; \
|
||||
rm /openfst*.deb; \
|
||||
fi
|
||||
|
||||
RHASSPY_TOOLS
|
||||
COPY download/phonetisaurus-2019.tar.gz /phonetisaurus.tar.gz
|
||||
RUN cd / && tar -xf phonetisaurus.tar.gz
|
||||
RUN cd /phonetisaurus && \
|
||||
./configure && \
|
||||
make -j $MAKE_THREADS && \
|
||||
make install && \
|
||||
rm -rf /phonetisaurus*
|
||||
|
||||
# Install Opengrm
|
||||
COPY download/opengrm-ngram-1.3.3.tar.gz /
|
||||
RUN cd / && tar -xf opengrm-ngram-1.3.3.tar.gz && \
|
||||
cd opengrm-ngram-1.3.3 && \
|
||||
./configure && \
|
||||
make -j $MAKE_THREADS && \
|
||||
make install && \
|
||||
ldconfig && \
|
||||
rm -rf /opengrm*
|
||||
|
||||
# Install Python dependencies
|
||||
RUN python3 -m pip install --no-cache-dir setuptools wheel
|
||||
RUN python3 -m pip install --no-cache-dir wheel
|
||||
|
||||
RUN apt-get install -y libfreetype6-dev libpng-dev pkg-config libffi-dev libssl-dev
|
||||
COPY download/jsgf2fst-0.1.0.tar.gz \
|
||||
/download/
|
||||
|
||||
RUN apt-get install -y libfreetype6-dev libpng-dev pkg-config
|
||||
COPY requirements.txt /requirements.txt
|
||||
RUN if [ "$BUILD_ARCH" != "amd64" ]; then \
|
||||
grep -v flair /requirements.txt > /requirements-noflair.txt; \
|
||||
@@ -54,7 +72,15 @@ RUN python3 -m pip install --no-cache-dir /pocketsphinx-python.tar.gz && \
|
||||
COPY download/snowboy-1.3.0.tar.gz /
|
||||
RUN if [ "$BUILD_ARCH" != "aarch64" ]; then pip3 install --no-cache-dir /snowboy-1.3.0.tar.gz; fi
|
||||
|
||||
RUN apt-get install --no-install-recommends --yes flite libttspico-utils
|
||||
# Install Mycroft Precise
|
||||
COPY download/precise-engine_0.3.0_${CPU_ARCH}.tar.gz /precise-engine.tar.gz
|
||||
RUN if [ "$BUILD_ARCH" != "aarch64" ]; then \
|
||||
cd / && tar -xzf /precise-engine.tar.gz && \
|
||||
ln -s /precise-engine/precise-engine /usr/bin/precise-engine && \
|
||||
rm /precise-engine.tar.gz; \
|
||||
fi
|
||||
|
||||
RUN apt-get install -y flite libttspico-utils
|
||||
|
||||
COPY download/kaldi_${BUILD_ARCH}.tar.gz /kaldi.tar.gz
|
||||
RUN mkdir -p /opt && \
|
||||
@@ -67,9 +93,6 @@ RUN ldconfig
|
||||
RUN find / -name bw -exec cp '{}' /usr/bin/ \;
|
||||
RUN find / -name mllr_solve -exec cp '{}' /usr/bin/ \;
|
||||
|
||||
# Install gstreamer and plugins
|
||||
RUN apt-get install --no-install-recommends --yes gstreamer1.0-tools gstreamer1.0-plugins-good
|
||||
|
||||
ENV RHASSPY_APP /usr/share/rhasspy
|
||||
|
||||
# Copy script to run
|
||||
@@ -85,12 +108,9 @@ COPY docker/rhasspy ${RHASSPY_APP}/bin/
|
||||
COPY dist/ ${RHASSPY_APP}/dist/
|
||||
COPY etc/wav/* ${RHASSPY_APP}/etc/wav/
|
||||
COPY rhasspy/profile_schema.json ${RHASSPY_APP}/rhasspy/
|
||||
COPY rhasspy/train/jsgf2fst/*.py ${RHASSPY_APP}/rhasspy/train/jsgf2fst/
|
||||
COPY rhasspy/train/*.py ${RHASSPY_APP}/rhasspy/train/
|
||||
COPY *.py ${RHASSPY_APP}/
|
||||
COPY rhasspy/*.py ${RHASSPY_APP}/rhasspy/
|
||||
|
||||
ENV CONFIG_PATH /data/options.json
|
||||
ENV KALDI_PREFIX /opt
|
||||
|
||||
ENTRYPOINT ["/run.sh"]
|
||||
@@ -14,30 +14,48 @@ COPY etc/qemu-arm-static /usr/bin/
|
||||
COPY etc/qemu-aarch64-static /usr/bin/
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends --yes \
|
||||
bash jq unzip \
|
||||
python3 python3-pip python3-dev \
|
||||
build-essential portaudio19-dev swig \
|
||||
libatlas-base-dev \
|
||||
sox espeak flite alsa-utils \
|
||||
git curl \
|
||||
autoconf libtool automake bison \
|
||||
sphinxbase-utils sphinxtrain
|
||||
apt-get install -y bash jq unzip \
|
||||
python3 python3-pip python3-dev \
|
||||
build-essential portaudio19-dev swig \
|
||||
libatlas-base-dev \
|
||||
sox espeak flite alsa-utils \
|
||||
git curl \
|
||||
autoconf libtool automake bison \
|
||||
sphinxbase-utils sphinxtrain
|
||||
|
||||
COPY download/openfst-1.6.2-1_${BUILD_ARCH}.deb /
|
||||
RUN if [ "$BUILD_ARCH" != "aarch64" ]; then \
|
||||
apt-get install --no-install-recommends --yes libfst-dev libfst-tools; \
|
||||
apt-get install -y libfst-dev libfst-tools; \
|
||||
else \
|
||||
dpkg -i /openfst-1.6.2-1_${BUILD_ARCH}.deb; \
|
||||
rm /openfst*.deb; \
|
||||
fi
|
||||
|
||||
RHASSPY_TOOLS
|
||||
COPY download/phonetisaurus-2019.tar.gz /phonetisaurus.tar.gz
|
||||
RUN cd / && tar -xf phonetisaurus.tar.gz
|
||||
RUN cd /phonetisaurus && \
|
||||
./configure && \
|
||||
make -j $MAKE_THREADS && \
|
||||
make install && \
|
||||
rm -rf /phonetisaurus*
|
||||
|
||||
# Install Opengrm
|
||||
COPY download/opengrm-ngram-1.3.3.tar.gz /
|
||||
RUN cd / && tar -xf opengrm-ngram-1.3.3.tar.gz && \
|
||||
cd opengrm-ngram-1.3.3 && \
|
||||
./configure && \
|
||||
make -j $MAKE_THREADS && \
|
||||
make install && \
|
||||
ldconfig && \
|
||||
rm -rf /opengrm*
|
||||
|
||||
# Install Python dependencies
|
||||
RUN python3 -m pip install --no-cache-dir setuptools wheel
|
||||
RUN python3 -m pip install --no-cache-dir wheel
|
||||
|
||||
RUN apt-get install -y libfreetype6-dev libpng-dev pkg-config libffi-dev libssl-dev
|
||||
COPY download/jsgf2fst-0.1.0.tar.gz \
|
||||
/download/
|
||||
|
||||
RUN apt-get install -y libfreetype6-dev libpng-dev pkg-config
|
||||
COPY requirements.txt /requirements.txt
|
||||
RUN if [ "$BUILD_ARCH" != "amd64" ]; then \
|
||||
grep -v flair /requirements.txt > /requirements-noflair.txt; \
|
||||
@@ -54,7 +72,15 @@ RUN python3 -m pip install --no-cache-dir /pocketsphinx-python.tar.gz && \
|
||||
COPY download/snowboy-1.3.0.tar.gz /
|
||||
RUN if [ "$BUILD_ARCH" != "aarch64" ]; then pip3 install --no-cache-dir /snowboy-1.3.0.tar.gz; fi
|
||||
|
||||
RUN apt-get install --no-install-recommends --yes flite libttspico-utils
|
||||
# Install Mycroft Precise
|
||||
COPY download/precise-engine_0.3.0_${CPU_ARCH}.tar.gz /precise-engine.tar.gz
|
||||
RUN if [ "$BUILD_ARCH" != "aarch64" ]; then \
|
||||
cd / && tar -xzf /precise-engine.tar.gz && \
|
||||
ln -s /precise-engine/precise-engine /usr/bin/precise-engine && \
|
||||
rm /precise-engine.tar.gz; \
|
||||
fi
|
||||
|
||||
RUN apt-get install -y flite libttspico-utils
|
||||
|
||||
COPY download/kaldi_${BUILD_ARCH}.tar.gz /kaldi.tar.gz
|
||||
RUN mkdir -p /opt && \
|
||||
@@ -67,9 +93,6 @@ RUN ldconfig
|
||||
RUN find / -name bw -exec cp '{}' /usr/bin/ \;
|
||||
RUN find / -name mllr_solve -exec cp '{}' /usr/bin/ \;
|
||||
|
||||
# Install gstreamer and plugins
|
||||
RUN apt-get install --no-install-recommends --yes gstreamer1.0-tools gstreamer1.0-plugins-good
|
||||
|
||||
RUN apt-get install -y pulseaudio
|
||||
COPY etc/pulseaudio.client.conf /etc/pulse/client.conf
|
||||
|
||||
@@ -102,12 +125,9 @@ COPY docker/rhasspy ${RHASSPY_APP}/bin/
|
||||
COPY dist/ ${RHASSPY_APP}/dist/
|
||||
COPY etc/wav/* ${RHASSPY_APP}/etc/wav/
|
||||
COPY rhasspy/profile_schema.json ${RHASSPY_APP}/rhasspy/
|
||||
COPY rhasspy/train/jsgf2fst/*.py ${RHASSPY_APP}/rhasspy/train/jsgf2fst/
|
||||
COPY rhasspy/train/*.py ${RHASSPY_APP}/rhasspy/train/
|
||||
COPY *.py ${RHASSPY_APP}/
|
||||
COPY rhasspy/*.py ${RHASSPY_APP}/rhasspy/
|
||||
|
||||
ENV CONFIG_PATH /data/options.json
|
||||
ENV KALDI_PREFIX /opt
|
||||
|
||||
ENTRYPOINT ["/run.sh"]
|
||||
Regular → Executable
+60
-52
@@ -14,24 +14,37 @@ COPY etc/qemu-arm-static /usr/bin/
|
||||
COPY etc/qemu-aarch64-static /usr/bin/
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends --yes \
|
||||
bash jq unzip \
|
||||
python3 python3-pip python3-dev \
|
||||
build-essential portaudio19-dev swig \
|
||||
libatlas-base-dev \
|
||||
sox espeak flite alsa-utils \
|
||||
git curl \
|
||||
autoconf libtool automake bison \
|
||||
sphinxbase-utils sphinxtrain
|
||||
apt-get install -y bash jq unzip \
|
||||
python3 python3-pip python3-dev \
|
||||
build-essential portaudio19-dev swig \
|
||||
libfst-dev libfst-tools \
|
||||
libatlas-base-dev \
|
||||
sox espeak flite alsa-utils \
|
||||
git curl \
|
||||
autoconf libtool automake bison \
|
||||
sphinxbase-utils sphinxtrain
|
||||
|
||||
COPY download/rhasspy-tools_${BUILD_ARCH}.tar.gz /
|
||||
RUN tar -C /usr -xvf /rhasspy-tools_${BUILD_ARCH}.tar.gz && \
|
||||
rm -f /rhasspy-tools_${BUILD_ARCH}.tar.gz
|
||||
COPY download/phonetisaurus-2019_${BUILD_ARCH}.deb /phonetisaurus.deb
|
||||
RUN dpkg -i /phonetisaurus.deb && \
|
||||
rm /phonetisaurus.deb
|
||||
|
||||
# Install Opengrm
|
||||
COPY download/opengrm-ngram-1.3.3.tar.gz /
|
||||
RUN cd / && tar -xf opengrm-ngram-1.3.3.tar.gz && \
|
||||
cd opengrm-ngram-1.3.3 && \
|
||||
./configure && \
|
||||
make -j $MAKE_THREADS && \
|
||||
make install && \
|
||||
ldconfig && \
|
||||
rm -rf /opengrm*
|
||||
|
||||
# Install Python dependencies
|
||||
RUN python3 -m pip install --no-cache-dir setuptools wheel
|
||||
RUN python3 -m pip install --no-cache-dir wheel
|
||||
|
||||
RUN apt-get install -y libfreetype6-dev libpng-dev pkg-config libffi-dev libssl-dev
|
||||
COPY download/jsgf2fst-0.1.0.tar.gz \
|
||||
/download/
|
||||
|
||||
RUN apt-get install -y libfreetype6-dev libpng-dev pkg-config
|
||||
COPY requirements.txt /requirements.txt
|
||||
RUN if [ "$BUILD_ARCH" != "amd64" ]; then \
|
||||
grep -v flair /requirements.txt > /requirements-noflair.txt; \
|
||||
@@ -48,7 +61,15 @@ RUN python3 -m pip install --no-cache-dir /pocketsphinx-python.tar.gz && \
|
||||
COPY download/snowboy-1.3.0.tar.gz /
|
||||
RUN if [ "$BUILD_ARCH" != "aarch64" ]; then pip3 install --no-cache-dir /snowboy-1.3.0.tar.gz; fi
|
||||
|
||||
RUN apt-get install --no-install-recommends --yes flite libttspico-utils
|
||||
# Install Mycroft Precise
|
||||
COPY download/precise-engine_0.3.0_${CPU_ARCH}.tar.gz /precise-engine.tar.gz
|
||||
RUN if [ "$BUILD_ARCH" != "aarch64" ]; then \
|
||||
cd / && tar -xzf /precise-engine.tar.gz && \
|
||||
ln -s /precise-engine/precise-engine /usr/bin/precise-engine && \
|
||||
rm /precise-engine.tar.gz; \
|
||||
fi
|
||||
|
||||
RUN apt-get install -y flite libttspico-utils
|
||||
|
||||
COPY download/kaldi_${BUILD_ARCH}.tar.gz /kaldi.tar.gz
|
||||
RUN mkdir -p /opt && \
|
||||
@@ -61,9 +82,6 @@ RUN ldconfig
|
||||
RUN find / -name bw -exec cp '{}' /usr/bin/ \;
|
||||
RUN find / -name mllr_solve -exec cp '{}' /usr/bin/ \;
|
||||
|
||||
# Install gstreamer and plugins
|
||||
RUN apt-get install --no-install-recommends --yes gstreamer1.0-tools gstreamer1.0-plugins-good
|
||||
|
||||
ENV RHASSPY_APP /usr/share/rhasspy
|
||||
|
||||
# Copy script to run
|
||||
@@ -74,6 +92,8 @@ RUN chmod +x /run.sh
|
||||
|
||||
COPY profiles/zh/profile.json \
|
||||
profiles/zh/custom_words.txt \
|
||||
profiles/zh/download-profile.sh \
|
||||
profiles/zh/check-profile.sh \
|
||||
profiles/zh/espeak_phonemes.txt \
|
||||
profiles/zh/phoneme_examples.txt \
|
||||
profiles/zh/frequent_words.txt \
|
||||
@@ -83,6 +103,8 @@ COPY profiles/zh/profile.json \
|
||||
COPY profiles/hi/ \
|
||||
profiles/hi/profile.json \
|
||||
profiles/hi/custom_words.txt \
|
||||
profiles/hi/download-profile.sh \
|
||||
profiles/hi/check-profile.sh \
|
||||
profiles/hi/espeak_phonemes.txt \
|
||||
profiles/hi/phoneme_examples.txt \
|
||||
profiles/hi/frequent_words.txt \
|
||||
@@ -91,6 +113,8 @@ COPY profiles/hi/ \
|
||||
|
||||
COPY profiles/el/profile.json \
|
||||
profiles/el/custom_words.txt \
|
||||
profiles/el/download-profile.sh \
|
||||
profiles/el/check-profile.sh \
|
||||
profiles/el/espeak_phonemes.txt \
|
||||
profiles/el/phoneme_examples.txt \
|
||||
profiles/el/frequent_words.txt \
|
||||
@@ -99,19 +123,18 @@ COPY profiles/el/profile.json \
|
||||
|
||||
COPY profiles/de/profile.json \
|
||||
profiles/de/custom_words.txt \
|
||||
profiles/de/download-profile.sh \
|
||||
profiles/de/check-profile.sh \
|
||||
profiles/de/espeak_phonemes.txt \
|
||||
profiles/de/phoneme_examples.txt \
|
||||
profiles/de/frequent_words.txt \
|
||||
profiles/de/sentences.ini \
|
||||
profiles/de/stop_words.txt ${RHASSPY_APP}/profiles/de/
|
||||
|
||||
COPY profiles/de/kaldi/custom_words.txt \
|
||||
profiles/de/kaldi/espeak_phonemes.txt \
|
||||
profiles/de/kaldi/phoneme_examples.txt \
|
||||
${RHASSPY_APP}/profiles/de/kaldi/
|
||||
|
||||
COPY profiles/it/profile.json \
|
||||
profiles/it/custom_words.txt \
|
||||
profiles/it/download-profile.sh \
|
||||
profiles/it/check-profile.sh \
|
||||
profiles/it/espeak_phonemes.txt \
|
||||
profiles/it/phoneme_examples.txt \
|
||||
profiles/it/frequent_words.txt \
|
||||
@@ -120,6 +143,8 @@ COPY profiles/it/profile.json \
|
||||
|
||||
COPY profiles/es/profile.json \
|
||||
profiles/es/custom_words.txt \
|
||||
profiles/es/download-profile.sh \
|
||||
profiles/es/check-profile.sh \
|
||||
profiles/es/espeak_phonemes.txt \
|
||||
profiles/es/phoneme_examples.txt \
|
||||
profiles/es/frequent_words.txt \
|
||||
@@ -128,6 +153,8 @@ COPY profiles/es/profile.json \
|
||||
|
||||
COPY profiles/fr/profile.json \
|
||||
profiles/fr/custom_words.txt \
|
||||
profiles/fr/download-profile.sh \
|
||||
profiles/fr/check-profile.sh \
|
||||
profiles/fr/espeak_phonemes.txt \
|
||||
profiles/fr/phoneme_examples.txt \
|
||||
profiles/fr/frequent_words.txt \
|
||||
@@ -136,6 +163,8 @@ COPY profiles/fr/profile.json \
|
||||
|
||||
COPY profiles/ru/profile.json \
|
||||
profiles/ru/custom_words.txt \
|
||||
profiles/ru/download-profile.sh \
|
||||
profiles/ru/check-profile.sh \
|
||||
profiles/ru/espeak_phonemes.txt \
|
||||
profiles/ru/phoneme_examples.txt \
|
||||
profiles/ru/frequent_words.txt \
|
||||
@@ -144,19 +173,18 @@ COPY profiles/ru/profile.json \
|
||||
|
||||
COPY profiles/nl/profile.json \
|
||||
profiles/nl/custom_words.txt \
|
||||
profiles/nl/download-profile.sh \
|
||||
profiles/nl/check-profile.sh \
|
||||
profiles/nl/espeak_phonemes.txt \
|
||||
profiles/nl/phoneme_examples.txt \
|
||||
profiles/nl/frequent_words.txt \
|
||||
profiles/nl/sentences.ini \
|
||||
profiles/nl/stop_words.txt ${RHASSPY_APP}/profiles/nl/
|
||||
|
||||
COPY profiles/nl/kaldi/custom_words.txt \
|
||||
profiles/nl/kaldi/espeak_phonemes.txt \
|
||||
profiles/nl/kaldi/phoneme_examples.txt \
|
||||
${RHASSPY_APP}/profiles/nl/kaldi/
|
||||
|
||||
COPY profiles/vi/profile.json \
|
||||
profiles/vi/custom_words.txt \
|
||||
profiles/vi/download-profile.sh \
|
||||
profiles/vi/check-profile.sh \
|
||||
profiles/vi/espeak_phonemes.txt \
|
||||
profiles/vi/phoneme_examples.txt \
|
||||
profiles/vi/frequent_words.txt \
|
||||
@@ -165,52 +193,32 @@ COPY profiles/vi/profile.json \
|
||||
|
||||
COPY profiles/pt/profile.json \
|
||||
profiles/pt/custom_words.txt \
|
||||
profiles/pt/download-profile.sh \
|
||||
profiles/pt/check-profile.sh \
|
||||
profiles/pt/espeak_phonemes.txt \
|
||||
profiles/pt/phoneme_examples.txt \
|
||||
profiles/pt/frequent_words.txt \
|
||||
profiles/pt/sentences.ini \
|
||||
profiles/pt/stop_words.txt ${RHASSPY_APP}/profiles/pt/
|
||||
|
||||
COPY profiles/sv/profile.json \
|
||||
profiles/sv/custom_words.txt \
|
||||
profiles/sv/espeak_phonemes.txt \
|
||||
profiles/sv/phoneme_examples.txt \
|
||||
profiles/sv/frequent_words.txt \
|
||||
profiles/sv/sentences.ini \
|
||||
profiles/sv/stop_words.txt ${RHASSPY_APP}/profiles/sv/
|
||||
|
||||
COPY profiles/ca/profile.json \
|
||||
profiles/ca/custom_words.txt \
|
||||
profiles/ca/espeak_phonemes.txt \
|
||||
profiles/ca/phoneme_examples.txt \
|
||||
profiles/ca/frequent_words.txt \
|
||||
profiles/ca/sentences.ini \
|
||||
profiles/ca/stop_words.txt ${RHASSPY_APP}/profiles/ca/
|
||||
|
||||
COPY profiles/en/profile.json \
|
||||
profiles/en/custom_words.txt \
|
||||
profiles/en/download-profile.sh \
|
||||
profiles/en/check-profile.sh \
|
||||
profiles/en/espeak_phonemes.txt \
|
||||
profiles/en/phoneme_examples.txt \
|
||||
profiles/en/frequent_words.txt \
|
||||
profiles/en/sentences.ini \
|
||||
profiles/en/stop_words.txt ${RHASSPY_APP}/profiles/en/
|
||||
|
||||
COPY profiles/en/kaldi/custom_words.txt \
|
||||
profiles/en/kaldi/espeak_phonemes.txt \
|
||||
profiles/en/kaldi/phoneme_examples.txt \
|
||||
${RHASSPY_APP}/profiles/en/kaldi/
|
||||
|
||||
COPY profiles/defaults.json ${RHASSPY_APP}/profiles/
|
||||
COPY docker/rhasspy ${RHASSPY_APP}/bin/
|
||||
COPY dist/ ${RHASSPY_APP}/dist/
|
||||
COPY etc/wav/* ${RHASSPY_APP}/etc/wav/
|
||||
COPY rhasspy/profile_schema.json ${RHASSPY_APP}/rhasspy/
|
||||
COPY rhasspy/train/jsgf2fst/*.py ${RHASSPY_APP}/rhasspy/train/jsgf2fst/
|
||||
COPY rhasspy/train/*.py ${RHASSPY_APP}/rhasspy/train/
|
||||
COPY *.py ${RHASSPY_APP}/
|
||||
COPY rhasspy/*.py ${RHASSPY_APP}/rhasspy/
|
||||
|
||||
ENV CONFIG_PATH /data/options.json
|
||||
ENV KALDI_PREFIX /opt
|
||||
|
||||
ENTRYPOINT ["/run.sh"]
|
||||
Regular → Executable
+36
-22
@@ -14,25 +14,37 @@ COPY etc/qemu-arm-static /usr/bin/
|
||||
COPY etc/qemu-aarch64-static /usr/bin/
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends --yes \
|
||||
bash jq unzip \
|
||||
python3 python3-pip python3-dev \
|
||||
build-essential portaudio19-dev swig \
|
||||
libfst-dev libfst-tools \
|
||||
libatlas-base-dev \
|
||||
sox espeak flite alsa-utils \
|
||||
git curl \
|
||||
autoconf libtool automake bison \
|
||||
sphinxbase-utils sphinxtrain
|
||||
apt-get install -y bash jq unzip \
|
||||
python3 python3-pip python3-dev \
|
||||
build-essential portaudio19-dev swig \
|
||||
libfst-dev libfst-tools \
|
||||
libatlas-base-dev \
|
||||
sox espeak flite alsa-utils \
|
||||
git curl \
|
||||
autoconf libtool automake bison \
|
||||
sphinxbase-utils sphinxtrain
|
||||
|
||||
COPY download/rhasspy-tools_${BUILD_ARCH}.tar.gz /
|
||||
RUN tar -C /usr -xvf /rhasspy-tools_${BUILD_ARCH}.tar.gz && \
|
||||
rm -f /rhasspy-tools_${BUILD_ARCH}.tar.gz
|
||||
COPY download/phonetisaurus-2019_${BUILD_ARCH}.deb /phonetisaurus.deb
|
||||
RUN dpkg -i /phonetisaurus.deb && \
|
||||
rm /phonetisaurus.deb
|
||||
|
||||
# Install Opengrm
|
||||
COPY download/opengrm-ngram-1.3.3.tar.gz /
|
||||
RUN cd / && tar -xf opengrm-ngram-1.3.3.tar.gz && \
|
||||
cd opengrm-ngram-1.3.3 && \
|
||||
./configure && \
|
||||
make -j $MAKE_THREADS && \
|
||||
make install && \
|
||||
ldconfig && \
|
||||
rm -rf /opengrm*
|
||||
|
||||
# Install Python dependencies
|
||||
RUN python3 -m pip install --no-cache-dir setuptools wheel
|
||||
RUN python3 -m pip install --no-cache-dir wheel
|
||||
|
||||
RUN apt-get install -y libfreetype6-dev libpng-dev pkg-config libffi-dev libssl-dev
|
||||
COPY download/jsgf2fst-0.1.0.tar.gz \
|
||||
/download/
|
||||
|
||||
RUN apt-get install -y libfreetype6-dev libpng-dev pkg-config
|
||||
COPY requirements.txt /requirements.txt
|
||||
RUN if [ "$BUILD_ARCH" != "amd64" ]; then \
|
||||
grep -v flair /requirements.txt > /requirements-noflair.txt; \
|
||||
@@ -49,7 +61,15 @@ RUN python3 -m pip install --no-cache-dir /pocketsphinx-python.tar.gz && \
|
||||
COPY download/snowboy-1.3.0.tar.gz /
|
||||
RUN if [ "$BUILD_ARCH" != "aarch64" ]; then pip3 install --no-cache-dir /snowboy-1.3.0.tar.gz; fi
|
||||
|
||||
RUN apt-get install --no-install-recommends --yes flite libttspico-utils
|
||||
# Install Mycroft Precise
|
||||
COPY download/precise-engine_0.3.0_${CPU_ARCH}.tar.gz /precise-engine.tar.gz
|
||||
RUN if [ "$BUILD_ARCH" != "aarch64" ]; then \
|
||||
cd / && tar -xzf /precise-engine.tar.gz && \
|
||||
ln -s /precise-engine/precise-engine /usr/bin/precise-engine && \
|
||||
rm /precise-engine.tar.gz; \
|
||||
fi
|
||||
|
||||
RUN apt-get install -y flite libttspico-utils
|
||||
|
||||
COPY download/kaldi_${BUILD_ARCH}.tar.gz /kaldi.tar.gz
|
||||
RUN mkdir -p /opt && \
|
||||
@@ -62,9 +82,6 @@ RUN ldconfig
|
||||
RUN find / -name bw -exec cp '{}' /usr/bin/ \;
|
||||
RUN find / -name mllr_solve -exec cp '{}' /usr/bin/ \;
|
||||
|
||||
# Install gstreamer and plugins
|
||||
RUN apt-get install --no-install-recommends --yes gstreamer1.0-tools gstreamer1.0-plugins-good
|
||||
|
||||
ENV RHASSPY_APP /usr/share/rhasspy
|
||||
|
||||
# Copy script to run
|
||||
@@ -80,12 +97,9 @@ COPY docker/rhasspy ${RHASSPY_APP}/bin/
|
||||
COPY dist/ ${RHASSPY_APP}/dist/
|
||||
COPY etc/wav/* ${RHASSPY_APP}/etc/wav/
|
||||
COPY rhasspy/profile_schema.json ${RHASSPY_APP}/rhasspy/
|
||||
COPY rhasspy/train/jsgf2fst/*.py ${RHASSPY_APP}/rhasspy/train/jsgf2fst/
|
||||
COPY rhasspy/train/*.py ${RHASSPY_APP}/rhasspy/train/
|
||||
COPY *.py ${RHASSPY_APP}/
|
||||
COPY rhasspy/*.py ${RHASSPY_APP}/rhasspy/
|
||||
|
||||
ENV CONFIG_PATH /data/options.json
|
||||
ENV KALDI_PREFIX /opt
|
||||
|
||||
ENTRYPOINT ["/run.sh"]
|
||||
Regular → Executable
+36
-22
@@ -14,25 +14,37 @@ COPY etc/qemu-arm-static /usr/bin/
|
||||
COPY etc/qemu-aarch64-static /usr/bin/
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends --yes \
|
||||
bash jq unzip \
|
||||
python3 python3-pip python3-dev \
|
||||
build-essential portaudio19-dev swig \
|
||||
libfst-dev libfst-tools \
|
||||
libatlas-base-dev \
|
||||
sox espeak flite alsa-utils \
|
||||
git curl \
|
||||
autoconf libtool automake bison \
|
||||
sphinxbase-utils sphinxtrain
|
||||
apt-get install -y bash jq unzip \
|
||||
python3 python3-pip python3-dev \
|
||||
build-essential portaudio19-dev swig \
|
||||
libfst-dev libfst-tools \
|
||||
libatlas-base-dev \
|
||||
sox espeak flite alsa-utils \
|
||||
git curl \
|
||||
autoconf libtool automake bison \
|
||||
sphinxbase-utils sphinxtrain
|
||||
|
||||
COPY download/rhasspy-tools_${BUILD_ARCH}.tar.gz /
|
||||
RUN tar -C /usr -xvf /rhasspy-tools_${BUILD_ARCH}.tar.gz && \
|
||||
rm -f /rhasspy-tools_${BUILD_ARCH}.tar.gz
|
||||
COPY download/phonetisaurus-2019_${BUILD_ARCH}.deb /phonetisaurus.deb
|
||||
RUN dpkg -i /phonetisaurus.deb && \
|
||||
rm /phonetisaurus.deb
|
||||
|
||||
# Install Opengrm
|
||||
COPY download/opengrm-ngram-1.3.3.tar.gz /
|
||||
RUN cd / && tar -xf opengrm-ngram-1.3.3.tar.gz && \
|
||||
cd opengrm-ngram-1.3.3 && \
|
||||
./configure && \
|
||||
make -j $MAKE_THREADS && \
|
||||
make install && \
|
||||
ldconfig && \
|
||||
rm -rf /opengrm*
|
||||
|
||||
# Install Python dependencies
|
||||
RUN python3 -m pip install --no-cache-dir setuptools wheel
|
||||
RUN python3 -m pip install --no-cache-dir wheel
|
||||
|
||||
RUN apt-get install -y libfreetype6-dev libpng-dev pkg-config libffi-dev libssl-dev
|
||||
COPY download/jsgf2fst-0.1.0.tar.gz \
|
||||
/download/
|
||||
|
||||
RUN apt-get install -y libfreetype6-dev libpng-dev pkg-config
|
||||
COPY requirements.txt /requirements.txt
|
||||
RUN if [ "$BUILD_ARCH" != "amd64" ]; then \
|
||||
grep -v flair /requirements.txt > /requirements-noflair.txt; \
|
||||
@@ -49,7 +61,15 @@ RUN python3 -m pip install --no-cache-dir /pocketsphinx-python.tar.gz && \
|
||||
COPY download/snowboy-1.3.0.tar.gz /
|
||||
RUN if [ "$BUILD_ARCH" != "aarch64" ]; then pip3 install --no-cache-dir /snowboy-1.3.0.tar.gz; fi
|
||||
|
||||
RUN apt-get install --no-install-recommends --yes flite libttspico-utils
|
||||
# Install Mycroft Precise
|
||||
COPY download/precise-engine_0.3.0_${CPU_ARCH}.tar.gz /precise-engine.tar.gz
|
||||
RUN if [ "$BUILD_ARCH" != "aarch64" ]; then \
|
||||
cd / && tar -xzf /precise-engine.tar.gz && \
|
||||
ln -s /precise-engine/precise-engine /usr/bin/precise-engine && \
|
||||
rm /precise-engine.tar.gz; \
|
||||
fi
|
||||
|
||||
RUN apt-get install -y flite libttspico-utils
|
||||
|
||||
COPY download/kaldi_${BUILD_ARCH}.tar.gz /kaldi.tar.gz
|
||||
RUN mkdir -p /opt && \
|
||||
@@ -62,9 +82,6 @@ RUN ldconfig
|
||||
RUN find / -name bw -exec cp '{}' /usr/bin/ \;
|
||||
RUN find / -name mllr_solve -exec cp '{}' /usr/bin/ \;
|
||||
|
||||
# Install gstreamer and plugins
|
||||
RUN apt-get install --no-install-recommends --yes gstreamer1.0-tools gstreamer1.0-plugins-good
|
||||
|
||||
RUN apt-get install -y pulseaudio
|
||||
COPY etc/pulseaudio.client.conf /etc/pulse/client.conf
|
||||
|
||||
@@ -97,12 +114,9 @@ COPY docker/rhasspy ${RHASSPY_APP}/bin/
|
||||
COPY dist/ ${RHASSPY_APP}/dist/
|
||||
COPY etc/wav/* ${RHASSPY_APP}/etc/wav/
|
||||
COPY rhasspy/profile_schema.json ${RHASSPY_APP}/rhasspy/
|
||||
COPY rhasspy/train/jsgf2fst/*.py ${RHASSPY_APP}/rhasspy/train/jsgf2fst/
|
||||
COPY rhasspy/train/*.py ${RHASSPY_APP}/rhasspy/train/
|
||||
COPY *.py ${RHASSPY_APP}/
|
||||
COPY rhasspy/*.py ${RHASSPY_APP}/rhasspy/
|
||||
|
||||
ENV CONFIG_PATH /data/options.json
|
||||
ENV KALDI_PREFIX /opt
|
||||
|
||||
ENTRYPOINT ["/run.sh"]
|
||||
@@ -1,17 +1,16 @@
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends --yes \
|
||||
bash jq unzip \
|
||||
python3 python3-pip python3-dev \
|
||||
build-essential portaudio19-dev swig \
|
||||
libatlas-base-dev \
|
||||
sox espeak flite alsa-utils \
|
||||
git curl \
|
||||
autoconf libtool automake bison \
|
||||
sphinxbase-utils sphinxtrain
|
||||
apt-get install -y bash jq unzip \
|
||||
python3 python3-pip python3-dev \
|
||||
build-essential portaudio19-dev swig \
|
||||
libatlas-base-dev \
|
||||
sox espeak flite alsa-utils \
|
||||
git curl \
|
||||
autoconf libtool automake bison \
|
||||
sphinxbase-utils sphinxtrain
|
||||
|
||||
COPY download/openfst-1.6.2-1_${BUILD_ARCH}.deb /
|
||||
RUN if [ "$BUILD_ARCH" != "aarch64" ]; then \
|
||||
apt-get install --no-install-recommends --yes libfst-dev libfst-tools; \
|
||||
apt-get install -y libfst-dev libfst-tools; \
|
||||
else \
|
||||
dpkg -i /openfst-1.6.2-1_${BUILD_ARCH}.deb; \
|
||||
rm /openfst*.deb; \
|
||||
|
||||
@@ -39,28 +39,28 @@ function set_variables {
|
||||
#------------
|
||||
# From source
|
||||
#------------
|
||||
# set_variables "$DIR/shared/" "$DIR/from-source/" \
|
||||
# "$DIR/alsa/" "$DIR/en_profile/" \
|
||||
# | cat - "$template" | m4 > "$out/Dockerfile.from-source.alsa.en"
|
||||
set_variables "$DIR/shared/" "$DIR/from-source/" \
|
||||
"$DIR/alsa/" "$DIR/en_profile/" \
|
||||
| cat - "$template" | m4 > "$out/Dockerfile.from-source.alsa.en"
|
||||
|
||||
# set_variables "$DIR/shared/" "$DIR/from-source/" \
|
||||
# "$DIR/pulseaudio/" "$DIR/en_profile/" \
|
||||
# | cat - "$template" | m4 > "$out/Dockerfile.from-source.pulseaudio.en"
|
||||
set_variables "$DIR/shared/" "$DIR/from-source/" \
|
||||
"$DIR/pulseaudio/" "$DIR/en_profile/" \
|
||||
| cat - "$template" | m4 > "$out/Dockerfile.from-source.pulseaudio.en"
|
||||
|
||||
# set_variables "$DIR/shared/" "$DIR/from-source/" \
|
||||
# "$DIR/alsa/" "$DIR/all_profiles/" \
|
||||
# | cat - "$template" | m4 > "$out/Dockerfile.from-source.alsa.all"
|
||||
set_variables "$DIR/shared/" "$DIR/from-source/" \
|
||||
"$DIR/alsa/" "$DIR/all_profiles/" \
|
||||
| cat - "$template" | m4 > "$out/Dockerfile.from-source.alsa.all"
|
||||
|
||||
#-----------
|
||||
# Pre-built
|
||||
#-----------
|
||||
# set_variables "$DIR/shared/" "$DIR/prebuilt/" \
|
||||
# "$DIR/alsa/" "$DIR/en_profile/" \
|
||||
# | cat - "$template" | m4 > "$out/Dockerfile.prebuilt.alsa.en"
|
||||
set_variables "$DIR/shared/" "$DIR/prebuilt/" \
|
||||
"$DIR/alsa/" "$DIR/en_profile/" \
|
||||
| cat - "$template" | m4 > "$out/Dockerfile.prebuilt.alsa.en"
|
||||
|
||||
# set_variables "$DIR/shared/" "$DIR/prebuilt/" \
|
||||
# "$DIR/pulseaudio/" "$DIR/en_profile/" \
|
||||
# | cat - "$template" | m4 > "$out/Dockerfile.prebuilt.pulseaudio.en"
|
||||
set_variables "$DIR/shared/" "$DIR/prebuilt/" \
|
||||
"$DIR/pulseaudio/" "$DIR/en_profile/" \
|
||||
| cat - "$template" | m4 > "$out/Dockerfile.prebuilt.pulseaudio.en"
|
||||
|
||||
set_variables "$DIR/shared/" "$DIR/prebuilt/" \
|
||||
"$DIR/alsa/" "$DIR/all_profiles/" \
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
COPY download/rhasspy-tools_${BUILD_ARCH}.tar.gz /
|
||||
RUN tar -C /usr -xvf /rhasspy-tools_${BUILD_ARCH}.tar.gz && \
|
||||
rm -f /rhasspy-tools_${BUILD_ARCH}.tar.gz
|
||||
@@ -1,10 +1,10 @@
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends --yes \
|
||||
bash jq unzip \
|
||||
python3 python3-pip python3-dev \
|
||||
build-essential portaudio19-dev swig \
|
||||
libatlas-base-dev \
|
||||
sox espeak flite alsa-utils \
|
||||
git curl \
|
||||
autoconf libtool automake bison \
|
||||
sphinxbase-utils sphinxtrain
|
||||
apt-get install -y bash jq unzip \
|
||||
python3 python3-pip python3-dev \
|
||||
build-essential portaudio19-dev swig \
|
||||
libfst-dev libfst-tools \
|
||||
libatlas-base-dev \
|
||||
sox espeak flite alsa-utils \
|
||||
git curl \
|
||||
autoconf libtool automake bison \
|
||||
sphinxbase-utils sphinxtrain
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
# Install gstreamer and plugins
|
||||
RUN apt-get install --no-install-recommends --yes gstreamer1.0-tools gstreamer1.0-plugins-good
|
||||
@@ -1,5 +1,5 @@
|
||||
# Install mitlm
|
||||
RUN apt-get install --no-install-recommends --yes gfortran
|
||||
RUN apt-get install -y gfortran
|
||||
COPY download/mitlm-0.4.2.tar.xz /
|
||||
RUN cd / && tar -xf mitlm-0.4.2.tar.xz && cd mitlm-0.4.2/ && \
|
||||
./configure && \
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
# Install Python dependencies
|
||||
RUN python3 -m pip install --no-cache-dir setuptools wheel
|
||||
RUN python3 -m pip install --no-cache-dir wheel
|
||||
|
||||
RUN apt-get install -y libfreetype6-dev libpng-dev pkg-config libffi-dev libssl-dev
|
||||
COPY download/jsgf2fst-0.1.0.tar.gz \
|
||||
/download/
|
||||
|
||||
RUN apt-get install -y libfreetype6-dev libpng-dev pkg-config
|
||||
COPY requirements.txt /requirements.txt
|
||||
RUN if [ "$BUILD_ARCH" != "amd64" ]; then \
|
||||
grep -v flair /requirements.txt > /requirements-noflair.txt; \
|
||||
|
||||
@@ -3,7 +3,5 @@ COPY docker/rhasspy ${RHASSPY_APP}/bin/
|
||||
COPY dist/ ${RHASSPY_APP}/dist/
|
||||
COPY etc/wav/* ${RHASSPY_APP}/etc/wav/
|
||||
COPY rhasspy/profile_schema.json ${RHASSPY_APP}/rhasspy/
|
||||
COPY rhasspy/train/jsgf2fst/*.py ${RHASSPY_APP}/rhasspy/train/jsgf2fst/
|
||||
COPY rhasspy/train/*.py ${RHASSPY_APP}/rhasspy/train/
|
||||
COPY *.py ${RHASSPY_APP}/
|
||||
COPY rhasspy/*.py ${RHASSPY_APP}/rhasspy/
|
||||
|
||||
@@ -1 +1 @@
|
||||
RUN apt-get install --no-install-recommends --yes flite libttspico-utils
|
||||
RUN apt-get install -y flite libttspico-utils
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
theme: jekyll-theme-cayman
|
||||
+1
-2
@@ -28,13 +28,12 @@ The following tools/libraries help to support Rhasspy:
|
||||
* [Phonetisaurus](https://github.com/AdolfVonKleist/Phonetisaurus) (word pronunciations)
|
||||
* [PicoTTS](https://en.wikipedia.org/wiki/SVOX) (text to speech)
|
||||
* [Pocketsphinx](https://github.com/cmusphinx/pocketsphinx) (speech to text, wake word)
|
||||
* [porcupine](https://github.com/Picovoice/Porcupine) (wake word)
|
||||
* [PyAudio](https://people.csail.mit.edu/hubert/pyaudio/) (microphone)
|
||||
* [pyjsgf](https://github.com/Danesprite/pyjsgf) (JSGF grammar parsing)
|
||||
* [Python 3](https://www.python.org)
|
||||
* [OpenFST](http://www.openfst.org) (intent recognition)
|
||||
* [Opengrm](http://www.opengrm.org/twiki/bin/view/GRM/NGramLibrary) (language modeling)
|
||||
* [Rasa NLU](https://rasa.com/) (intent recognition)
|
||||
* [RasaNLU](https://rasa.com/) (intent recognition)
|
||||
* [sphinxtrain](https://github.com/cmusphinx/sphinxtrain) (acoustic model tuning)
|
||||
* [snowboy](https://snowboy.kitt.ai) (wake word)
|
||||
* [Sox](http://sox.sourceforge.net) (WAV conversion)
|
||||
|
||||
+1
-61
@@ -54,7 +54,7 @@ See `rhasspy.audio_recorder.ARecordAudioRecorder` for details.
|
||||
|
||||
Listens to the `hermes/audioServer/<SITE_ID>/audioFrame` topic for WAV data ([Hermes protocol](https://docs.snips.ai/ressources/hermes-protocol)).
|
||||
This allows Rhasspy to receive audio from [Snips.AI](https://snips.ai/).
|
||||
Audio data is automatically converted to 16-bit, 16 kHz mono with [sox](http://sox.sourceforge.net).
|
||||
Audio data is automatically converted to 16-bit, 16Khz mono with [sox](http://sox.sourceforge.net).
|
||||
|
||||
Add to your [profile](profiles.md):
|
||||
|
||||
@@ -78,66 +78,6 @@ Set `mqtt.site_id` to match your Snips.AI siteId.
|
||||
|
||||
See `rhasspy.audio_recorder.HermesAudioRecorder` for details.
|
||||
|
||||
## HTTP Stream
|
||||
|
||||
Accepts chunks of 16-bit 16Khz mono audio via an HTTP POST stream (assumes [chunked transfer encoding](https://en.wikipedia.org/wiki/Chunked_transfer_encoding)).
|
||||
|
||||
Add to your [profile](profiles.md):
|
||||
|
||||
```json
|
||||
"microphone": {
|
||||
"system": "http",
|
||||
"http": {
|
||||
"host": "127.0.0.1",
|
||||
"port": 12333,
|
||||
"stop_after": "never"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Set `microphone.http.stop_after` to one of "never", "text", or "intent". When set to "never", you can continously stream (chunked) audio into Rhasspy across multiple voice commands. When set to "text" or "intent", the stream will be closed when the first voice command has been transcribed ("text") or recognized ("intent"). Once closed, you can perform an HTTP GET request to the stream URL to retrieve the result (text for transcriptions or JSON for intent).
|
||||
|
||||
Note that `microphone.http.port` must be different than Rhasspy's webserver port (usually 12101).
|
||||
|
||||
See `rhasspy.audio_recorder.HTTPAudioRecorder` for details.
|
||||
|
||||
## GStreamer
|
||||
|
||||
Receives audio chunks via stdout from a [GStreamer](https://gstreamer.freedesktop.org/) pipeline.
|
||||
|
||||
Add to your [profile](profiles.md):
|
||||
|
||||
```json
|
||||
"microphone": {
|
||||
"system": "gstreamer",
|
||||
"gstreamer": {
|
||||
"pipeline": "...",
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Set `microphone.gstreamer.pipeline` to your GStreamer pipeline **without a sink** (this will be added by Rhasspy). By default, the pipeline is:
|
||||
|
||||
```
|
||||
udpsrc port=12333 ! rawaudioparse use-sink-caps=false format=pcm pcm-format=s16le sample-rate=16000 num-channels=1 ! queue ! audioconvert ! audioresample
|
||||
```
|
||||
|
||||
which "simply" receives raw 16-bit 16khz audio chunks via UDP port 12333. You could stream microphone audio to Rhasspy from another machine by running the following terminal command:
|
||||
|
||||
```bash
|
||||
gst-launch-1.0 \
|
||||
autoaudiosrc ! \
|
||||
audioconvert ! \
|
||||
audioresample ! \
|
||||
audio/x-raw, rate=16000, channels=1, format=S16LE ! \
|
||||
udpsink host=RHASSPY_SERVER port=12333
|
||||
```
|
||||
|
||||
where `RHASSPY_SERVER` is the hostname of your Rhasspy server (e.g., `localhost`).
|
||||
|
||||
The Rhasspy Docker images contains the ["good" plugin](https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/) set for GStreamer, which includes a wide variety of ways to stream/transform audio.
|
||||
|
||||
See `rhasspy.audio_recorder.GStreamerAudioRecorder` for details.
|
||||
|
||||
## Dummy
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ See `rhasspy.audio_player.APlayAudioPlayer` for details.
|
||||
Publishes WAV data to the `hermes/audioServer/<SITE_ID>/playBytes/<REQUEST_ID>` topic ([Hermes protocol](https://docs.snips.ai/ressources/hermes-protocol)).
|
||||
This allows Rhasspy to send audio to [Snips.AI](https://snips.ai/).
|
||||
|
||||
Rhasspy will always try to send 16 kHz, 16-bit mono audio.
|
||||
Rhasspy will always try to send 16Khz, 16-bit mono audio.
|
||||
The request id is generated each time a sound is played using `uuid.uuid4`.
|
||||
|
||||
Add to your [profile](profiles.md):
|
||||
|
||||
@@ -124,7 +124,7 @@ Add to your [profile](profiles.md):
|
||||
|
||||
When awake, Rhasspy normally listens for voice commands from the microphone and waits for silence by using [webrtcvad](https://github.com/wiseman/py-webrtcvad). You can call a custom program that will listen for a voice command and simply return the recorded WAV audio data to Rhasspy.
|
||||
|
||||
When Rhasspy wakes up, your program will be called with the given arguments. The program's output should be WAV data with the recorded voice command (Rhasspy will automatically convert this to 16-bit 16 kHz mono if necessary).
|
||||
When Rhasspy wakes up, your program will be called with the given arguments. The program's output should be WAV data with the recorded voice command (Rhasspy will automatically convert this to 16-bit 16Khz mono if necessary).
|
||||
|
||||
The following environment variables are available to your program:
|
||||
|
||||
|
||||
@@ -5,27 +5,6 @@ Rhasspy is designed to be run on different kinds of hardware, such as:
|
||||
* Raspberry Pi 2-3 B/B+ (`armhf`/`aarch64`)
|
||||
* Desktop/laptop/server (`amd64`)
|
||||
|
||||
The table below summarizes architecture compatibility with Rhasspy's components:
|
||||
|
||||
| Category | Name | amd64 | armhf | aarch64 |
|
||||
| -------- | ------ | ------- | ------- | ------- |
|
||||
| **Wake Word** | [pocketsphinx](wake-word.md#pocketsphinx) | ✓ | ✓ | ✓ |
|
||||
| | [snowboy](wake-word.md#snowboy) | ✓ | ✓ | |
|
||||
| | [precise](wake-word.md#mycroft-precise) | ✓ | ✓ | |
|
||||
| | [porcupine](wake-word.md#porcupine) | ✓ | ✓ | ✓ |
|
||||
| **Speech to Text** | [pocketsphinx](speech-to-text.md#pocketsphinx) | ✓ | ✓ | ✓ |
|
||||
| | [kaldi](speech-to-text.md#kaldi) | ✓ | ✓ | ✓ |
|
||||
| **Intent Recognition** | [fsticuffs](intent-recognition.md#fsticuffs) | ✓ | ✓ | ✓ |
|
||||
| | [fuzzywuzzy](intent-recognition.md#fuzzywuzzy) | ✓ | ✓ | ✓ |
|
||||
| | [adapt](intent-recognition.md#mycroft-adapt) | ✓ | ✓ | ✓ |
|
||||
| | [flair](intent-recognition.md#flair) | ✓ | | |
|
||||
| | [rasaNLU](intent-recognition.md#rasanlu) | ✓ | ✓ | ✓ |
|
||||
| **Text to Speech** | [espeak](text-to-speech.md#espeak) | ✓ | ✓ | ✓ |
|
||||
| | [flite](text-to-speech.md#flite) | ✓ | ✓ | ✓ |
|
||||
| | [picotts](text-to-speech.md#picotts) | ✓ | ✓ | ✓ |
|
||||
| | [marytts](text-to-speech.md#marytts) | ✓ | ✓ | ✓ |
|
||||
| | [wavenet](text-to-speech.md#google-wavenet) | ✓ | ✓ | ✓ |
|
||||
|
||||
## Raspberry Pi
|
||||
|
||||
To run Rhasspy on a Raspberry Pi, you'll need at least a 4 GB SD card and a good power supply. I highly recommend the [CanaKit Starter Kit](https://www.amazon.com/CanaKit-Raspberry-Starter-Premium-Black/dp/B07BCC8PK7), which includes a 32 GB SD card, a 2.5 A power supply, and a case.
|
||||
|
||||
+21
-28
@@ -1,6 +1,6 @@
|
||||

|
||||
|
||||
Rhasspy (pronounced RAH-SPEE) is an [open source](https://github.com/synesthesiam/rhasspy), fully offline voice assistant toolkit for [many languages](#supported-languages) that works well with [Home Assistant](https://www.home-assistant.io/), [Hass.io](https://www.home-assistant.io/hassio/), and [Node-RED](https://nodered.org).
|
||||
Rhasspy (pronounced RAH-SPEE) is an offline, [multilingual](#supported-languages) voice assistant toolkit inspired by [Jasper](https://jasperproject.github.io/) that works well with [Home Assistant](https://www.home-assistant.io/), [Hass.io](https://www.home-assistant.io/hassio/), and [Node-RED](https://nodered.org).
|
||||
|
||||
Rhasspy transforms voice commands into [JSON](https://json.org) events that can trigger actions in home automation software, like [Home Assistant automations](https://www.home-assistant.io/docs/automation/trigger/#event-trigger) or [Node-RED flows](usage.md#node-red). You define custom voice commands in a [profile](profiles.md) using a [specialized template syntax](training.md), and Rhasspy takes care of the rest.
|
||||
|
||||
@@ -20,7 +20,6 @@ Rhasspy provides **offline, private solutions** to problems 1-4 using off-the-sh
|
||||
* [Pocketsphinx keyphrase](https://cmusphinx.github.io/wiki/tutoriallm/#using-keyword-lists-with-pocketsphinx)
|
||||
* [Mycroft Precise](https://github.com/MycroftAI/mycroft-precise)
|
||||
* [snowboy](https://snowboy.kitt.ai)
|
||||
* [porcupine](https://github.com/Picovoice/Porcupine)
|
||||
* **Command listener**
|
||||
* [webrtcvad](https://github.com/wiseman/py-webrtcvad)
|
||||
* **Speech to text**
|
||||
@@ -30,16 +29,13 @@ Rhasspy provides **offline, private solutions** to problems 1-4 using off-the-sh
|
||||
* [OpenFST](https://www.openfst.org)
|
||||
* [fuzzywuzzy](https://github.com/seatgeek/fuzzywuzzy)
|
||||
* [Mycroft Adapt](https://github.com/MycroftAI/adapt)
|
||||
* [flair](http://github.com/zalandoresearch/flair)
|
||||
* [Rasa NLU](https://rasa.com/)
|
||||
* [RasaNLU](https://rasa.com/)
|
||||
|
||||
For problem 5 (fulfilling the speaker's intent), Rhasspy works with external home automation software, such as Home Assistant's built-in [automation capability](https://www.home-assistant.io/docs/automation/) or a [Node-RED flow](https://nodered.org).
|
||||
|
||||
For each intent you define, Rhasspy emits a JSON event that can do anything Home Assistant can do (toggle switches, call REST services, etc.). This means that Rhasspy will do very little out of the box compared to other voice assistants, but there are also be *no limits* to what can be done.
|
||||
For problem 5 (fulfilling the speaker's intent), Rhasspy works with external home automation software, such as Home Assistant's built-in [automation capability](https://www.home-assistant.io/docs/automation/) or a [Node-RED flow](https://nodered.org). For each intent you define, Rhasspy emits a JSON event that can, for example, be used to do anything Home Assistant can do (toggle switches, call REST services, etc.). This means that Rhasspy will do very little out of the box compared to other voice assistants, but there are also be *no limits* to what can be done.
|
||||
|
||||
## Supported Languages
|
||||
|
||||
Rhasspy supports the following languages:
|
||||
Rhasspy currently supports the following languages:
|
||||
|
||||
* English (`en`)
|
||||
* German (`de`)
|
||||
@@ -53,8 +49,6 @@ Rhasspy supports the following languages:
|
||||
* Mandarin (`zh`)
|
||||
* Vietnamese (`vi`)
|
||||
* Portuguese (`pt`)
|
||||
* Swedish (`sv`)
|
||||
* Catalan (`ca`)
|
||||
|
||||
Support for these languages comes directly from existing [CMU Sphinx](https://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/) and [Kaldi](https://montreal-forced-aligner.readthedocs.io/en/latest/pretrained_models.html) acoustic models.
|
||||
|
||||
@@ -66,24 +60,23 @@ It is possible to extend Rhasspy to new languages with only:
|
||||
|
||||
The table below summarizes language support across the various supporting technologies that Rhasspy uses:
|
||||
|
||||
| Category | Name | Offline? | en | de | es | fr | it | nl | ru | el | hi | zh | vi | pt | sv | ca |
|
||||
| -------- | ------ | -------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |
|
||||
| **Wake Word** | [pocketsphinx](wake-word.md#pocketsphinx) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | |
|
||||
| | [porcupine](wake-word.md#porcupine) | ✓ | ✓ | | | | | | | | | | | | | |
|
||||
| | [snowboy](wake-word.md#snowboy) | *requires account* | ✓ | • | • | • | • | • | • | • | • | • | • | • | • | • |
|
||||
| | [precise](wake-word.md#mycroft-precise) | ✓ | ✓ | • | • | • | • | • | • | • | • | • | • | • | • | • |
|
||||
| **Speech to Text** | [pocketsphinx](speech-to-text.md#pocketsphinx) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | | ✓ |
|
||||
| | [kaldi](speech-to-text.md#kaldi) | ✓ | | | | | | | | | | | ✓ | | ✓ | |
|
||||
| **Intent Recognition** | [fsticuffs](intent-recognition.md#fsticuffs) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [fuzzywuzzy](intent-recognition.md#fuzzywuzzy) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [adapt](intent-recognition.md#mycroft-adapt) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [flair](intent-recognition.md#flair) | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | | | | | | ✓ | | ✓ |
|
||||
| | [rasaNLU](intent-recognition.md#rasanlu) | *needs extra software* | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| **Text to Speech** | [espeak](text-to-speech.md#espeak) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [flite](text-to-speech.md#flite) | ✓ | ✓ | | | | | | | | ✓ | | | | | |
|
||||
| | [picotts](text-to-speech.md#picotts) | ✓ | ✓ | | | | | | | | | | | | | |
|
||||
| | [marytts](text-to-speech.md#marytts) | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ | | | | | | | |
|
||||
| | [wavenet](text-to-speech.md#google-wavenet) | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ | ✓ | |
|
||||
| Category | Name | Offline? | en | de | es | fr | it | nl | ru | el | hi | zh | vi | pt |
|
||||
| -------- | ------ | -------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |
|
||||
| **Wake Word** | [pocketsphinx](wake-word.md#pocketsphinx) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||
| | [snowboy](wake-word.md#snowboy) | *requires account* | ✓ | • | • | • | • | • | • | • | • | • | • | • |
|
||||
| | [precise](wake-word.md#mycroft-precise) | ✓ | ✓ | • | • | • | • | • | • | • | • | • | • | • |
|
||||
| **Speech to Text** | [pocketsphinx](speech-to-text.md#pocketsphinx) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||
| | [kaldi](speech-to-text.md#kaldi) | ✓ | | | | | | | | | | | ✓ | ✓ |
|
||||
| **Intent Recognition** | [fsticuffs](intent-recognition.md#fsticuffs) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [fuzzywuzzy](intent-recognition.md#fuzzywuzzy) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [adapt](intent-recognition.md#mycroft-adapt) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [flair](intent-recognition.md#flair) | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | | | | | | ✓ |
|
||||
| | [rasaNLU](intent-recognition.md#rasanlu) | *needs extra software* | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| **Text to Speech** | [espeak](text-to-speech.md#espeak) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [flite](text-to-speech.md#flite) | ✓ | ✓ | | | | | | | | ✓ | | | |
|
||||
| | [picotts](text-to-speech.md#picotts) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | [marytts](text-to-speech.md#marytts) | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ | | | | | |
|
||||
| | [wavenet](text-to-speech.md#google-wavenet) | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ |
|
||||
|
||||
• - yes, but requires training/customization
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Rhasspy should run in a variety of software environments, including:
|
||||
|
||||
* Within a [Docker](https://www.docker.com/) container
|
||||
* As a [Hass.io add-on](https://www.home-assistant.io/addons/)
|
||||
* As a [Hass.IO add-on](https://www.home-assistant.io/addons/)
|
||||
* Inside a [Python virtual environment](https://docs.python-guide.org/dev/virtualenvs/)
|
||||
|
||||
### Docker
|
||||
@@ -45,9 +45,9 @@ If you're using [docker compose](https://docs.docker.com/compose/), add the foll
|
||||
- "/dev/snd:/dev/snd"
|
||||
command: --user-profiles /profiles --profile en
|
||||
|
||||
### Hass.io
|
||||
### Hass.IO
|
||||
|
||||
The second easiest was to install Rhasspy is as a [Hass.io add-on](https://www.home-assistant.io/addons/). Following the [installation instructions for Hass.io](https://www.home-assistant.io/hassio/installation/) before proceeding.
|
||||
The second easiest was to install Rhasspy is as a [Hass.IO add-on](https://www.home-assistant.io/addons/). Following the [installation instructions for Hass.IO](https://www.home-assistant.io/hassio/installation/) before proceeding.
|
||||
|
||||
To install the add-on, add my [Hass.IO Add-On Repository](https://github.com/synesthesiam/hassio-addons) in the Add-On Store, refresh, then install the "Rhasspy Assistant" under “Synesthesiam Hass.IO Add-Ons” (all the way at the bottom of the Add-On Store screen).
|
||||
|
||||
@@ -59,7 +59,7 @@ Watch the system log for a message like `Build 8e35c251/armhf-addon-rhasspy:2.11
|
||||
|
||||
Before starting the add-on, make sure to give it access to your microphone and speakers:
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
### Virtual Environment
|
||||
|
||||
@@ -24,14 +24,11 @@ Add to your [profile](profiles.md):
|
||||
"system": "fsticuffs",
|
||||
"fsticuffs": {
|
||||
"intent_fst": "intent.fst",
|
||||
"ignore_unknown_words": true,
|
||||
"fuzzy": true
|
||||
"ignore_unknown_words": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
By default, fuzzy mathing is enabled (`fuzzy` is true). This allows `fsticuffs` to be less strict when matching text, skipping over any words in `stop_words.txt`, and handling repeated words gracefully. Words must still appear in the correct order according to `sentences.ini`, but additional words will not cause a recognition failure.
|
||||
|
||||
When `ignore_unknown_words` is true, any word outside of `sentences.ini` is simply ignored. This allows a lot more sentences to be accepted, but may cause unexpected results when used with arbitrary input from text chat.
|
||||
|
||||
See `rhasspy.intent.FsticuffsRecognizer` for details.
|
||||
@@ -98,7 +95,7 @@ See `rhasspy.intent.FlairRecognizer` for details.
|
||||
|
||||
## RasaNLU
|
||||
|
||||
Recognizes intents **remotely** using a [Rasa NLU](https://rasa.com/) server. You must [install a Rasa NLU server](https://rasa.com/docs/rasa/user-guide/installation/) somewhere that Rhasspy can access. Works well when you have a large number of sentences (thousands to hundreds of thousands) and need to handle sentences *and* words not seen during training. This needs Rasa 1.0 or higher.
|
||||
Recognizes intents **remotely** using a [rasaNLU](https://rasa.com/) server. You must [install a rasaNLU server](https://rasa.com/docs/nlu/installation) somewhere that Rhasspy can access. Works well when you have a large number of sentences (thousands to hundreds of thousands) and need to handle sentences *and* words not seen during training.
|
||||
|
||||
Add to your [profile](profiles.md):
|
||||
|
||||
@@ -108,7 +105,7 @@ Add to your [profile](profiles.md):
|
||||
"rasa": {
|
||||
"examples_markdown": "intent_examples.md",
|
||||
"project_name": "rhasspy",
|
||||
"url": "http://localhost:5005/"
|
||||
"url": "http://localhost:5000/"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -132,29 +129,6 @@ Add to your [profile](profiles.md):
|
||||
|
||||
See `rhasspy.intent.RemoteRecognizer` for details.
|
||||
|
||||
## Home Assistant Conversation
|
||||
|
||||
Sends transcriptions from [speech to text](speech-to-text.md) to [Home Assistant's conversation API](https://www.home-assistant.io/integrations/conversation/). If the response contains speech, Rhasspy can optionally speak it.
|
||||
|
||||
Add to your [profile](profiles.md):
|
||||
|
||||
```json
|
||||
"intent": {
|
||||
"system": "conversation",
|
||||
"conversation": {
|
||||
"handle_speech": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
When `handle_speech` is `true`, Rhasspy will forward the returned speech to your [text to speech](text-to-speech.md) system.
|
||||
|
||||
The settings from your profile's `home_assistant` section are automatically used (URL, access token, etc.).
|
||||
|
||||
Because Home Assistant will already handle your intent (probably using an [intent script](https://www.home-assistant.io/integrations/intent_script/)), Rhasspy will always generate an empty intent with this recognizer.
|
||||
|
||||
See `rhasspy.intent.HomeAssistantConversationRecognizer` for details.
|
||||
|
||||
## Command
|
||||
|
||||
Recognizes intents from text using a custom external program.
|
||||
@@ -171,7 +145,7 @@ Add to your [profile](profiles.md):
|
||||
}
|
||||
```
|
||||
|
||||
Rhasspy recognizes intents from text using one of several systems, such as [fuzzywuzzy](https://github.com/seatgeek/fuzzywuzzy) or [Rasa NLU](https://rasa.com/). You can call a custom program that does intent recognition from a text command.
|
||||
Rhasspy recognizes intents from text using one of several systems, such as [fuzzywuzzy](https://github.com/seatgeek/fuzzywuzzy) or [rasaNLU](https://rasa.com/). You can call a custom program that does intent recognition from a text command.
|
||||
|
||||
When a voice command is successfully transcribed, your program will be called with the text transcription printed to standard in. Your program should return JSON on standard out, something like:
|
||||
|
||||
|
||||
+5
-42
@@ -23,7 +23,7 @@ The default location for each of these directories is:
|
||||
* User profile location is `$HOME/.config/rhasspy/profiles`
|
||||
* Docker
|
||||
* System profile location is either `/usr/share/rhasspy/profiles` (ALSA) or `/home/rhasspy/profiles` (PulseAudio)
|
||||
* User profile location **must** be explicitly set and mapped to a volume:
|
||||
* User profile location **must** be explicity set and mapped to a volume:
|
||||
* `docker run ... -v /path/to/profiles:/profiles synesthesiam/rhasspy-server --user-profiles /profiles`
|
||||
|
||||
### Example
|
||||
@@ -73,8 +73,6 @@ All available profile sections and settings are listed below:
|
||||
* `dictionary` - text file with all words/pronunciations needed for example sentences
|
||||
* `unknown_words` - small text file with guessed word pronunciations (from phonetisaurus)
|
||||
* `language_model` - text file with trigram [ARPA language model](https://cmusphinx.github.io/wiki/arpaformat/) built from example sentences
|
||||
* `open_transcription` - true if general language model should be used (custom voices commands ignored)
|
||||
* `base_language_model` - large general language model (read only)
|
||||
* `mllr_matrix` - MLLR matrix from [acoustic model tuning](https://cmusphinx.github.io/wiki/tutorialtuning/)
|
||||
* `mix_weight` - how much of the base language model to [mix in during training](training.md#language-model-mixing) (0-1)
|
||||
* `mix_fst` - path to save mixed ngram FST model
|
||||
@@ -83,11 +81,9 @@ All available profile sections and settings are listed below:
|
||||
* `kaldi_dir` - absolute path to Kaldi root directory
|
||||
* `model_dir` - directory where Kaldi model is stored (relative to profile directory)
|
||||
* `graph` - directory where HCLG.fst is located (relative to `model_dir`)
|
||||
* `base_graph` - directory where large general HCLG.fst is located (relative to `model_dir`)
|
||||
* `base_dictionary` - large text file with word pronunciations (read only)
|
||||
* `custom_words` - small text file with words/pronunciations added by user
|
||||
* `dictionary` - text file with all words/pronunciations needed for example sentences
|
||||
* `open_transcription` - true if general language model should be used (custom voices commands ignored)
|
||||
* `unknown_words` - small text file with guessed word pronunciations (from phonetisaurus)
|
||||
* `mix_weight` - how much of the base language model to [mix in during training](training.md#language-model-mixing) (0-1)
|
||||
* `mix_fst` - path to save mixed ngram FST model
|
||||
@@ -107,14 +103,13 @@ All available profile sections and settings are listed below:
|
||||
* `fsticuffs` - configuration for [OpenFST-based](https://www.openfst.org) intent recognizer
|
||||
* `intent_fst` - path to generated finite state transducer with all intents combined
|
||||
* `ignore_unknown_words` - true if words not in the FST symbol table should be ignored
|
||||
* `fuzzy` - true if text is matching in a fuzzy manner, skipping words in `stop_words.txt`
|
||||
* `fuzzywuzzy` - configuration for simplistic [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) based intent recognizer
|
||||
* `examples_json` - JSON file with intents/example sentences
|
||||
* `min_confidence` - minimum confidence required for intent to be converted to a JSON event (0-1)
|
||||
* `remote` - configuration for remote Rhasspy server
|
||||
* `url` - URL to POST text to for intent recognition (e.g., `http://your-rhasspy-server:12101/api/text-to-intent`)
|
||||
* `rasa` - configuration for [Rasa NLU](https://rasa.com/) based intent recognizer
|
||||
* `url` - URL of remote Rasa NLU server (e.g., `http://localhost:5005/`)
|
||||
* `rasa` - configuration for [rasaNLU](https://rasa.com/) based intent recognizer
|
||||
* `url` - URL of remote rasaNLU server (e.g., `http://localhost:5000/`)
|
||||
* `examples_markdown` - Markdown file to generate with intents/example sentences
|
||||
* `project_name` - name of project to generate during training
|
||||
* `adapt` - configuration for [Mycroft Adapt](https://github.com/MycroftAI/adapt) based intent recognizer
|
||||
@@ -134,15 +129,6 @@ All available profile sections and settings are listed below:
|
||||
* `url` - address:port of MaryTTS server (port is usually 59125)
|
||||
* `voice` - name of voice to use (e.g., `cmu-slt`). Default if not present.
|
||||
* `locale` - name of locale to use (e.g., `en-US`). Default if not present.
|
||||
* `wavenet` - configuration for Google's [WaveNet](https://cloud.google.com/text-to-speech/docs/wavenet)
|
||||
* `cache_dir` - path to directory in your profile where WAV files are cached
|
||||
* `credentials_json` - path to the JSON credentials file (generated online)
|
||||
* `gender` - gender of speaker (`MALE` `FEMALE`)
|
||||
* `language_code` - language/locale e.g. `en-US`,
|
||||
* `sample_rate` - WAV sample rate (default: 22050)
|
||||
* `url` - URL of WaveNet endpoint
|
||||
* `voice` - voice to use (e.g., `Wavenet-C`)
|
||||
* `fallback_tts` - text to speech system to use when offline or error occurs (e.g., `espeak`)
|
||||
* `phoneme_examples` - text file with examples for each CMU phoneme
|
||||
* `training` - training speech/intent recognizers
|
||||
* `dictionary_number_duplicates` - true if duplicate words in dictionary should be suffixed by `(2)`, `(3)`, etc.
|
||||
@@ -164,7 +150,7 @@ All available profile sections and settings are listed below:
|
||||
* `program` - path to executable
|
||||
* `arguments` - list of arguments to pass to program
|
||||
* `wake` - waking Rhasspy up for speech input
|
||||
* `system` - wake word recognition system (`pocketsphinx`, `snowboy`, `precise`, `porcupine`, `command`, or `dummy`)
|
||||
* `system` - wake word recognition system (`pocketsphinx`, `snowboy`, `precise`, `command`, or `dummy`)
|
||||
* `pocketsphinx` - configuration for Pocketsphinx wake word recognizer
|
||||
* `keyphrase` - phrase to wake up on (3-4 syllables recommended)
|
||||
* `threshold` - sensitivity of detection (recommended range 1e-50 to 1e-5)
|
||||
@@ -180,28 +166,17 @@ All available profile sections and settings are listed below:
|
||||
* `sensitivity` - model sensitivity (0-1, default 0.5)
|
||||
* `trigger_level` - number of events to trigger activation (default 3)
|
||||
* `chunk_size` - number of bytes per chunk to feed to Precise (default 2048)
|
||||
* `porcupine` - configuration for [PicoVoice's Porcupine](https://github.com/Picovoice/Porcupine)
|
||||
* `library_path` - path to `libpv_porcupine.so` for your platform/architecture
|
||||
* `model_path` - path to the `porcupine_params.pv` (lib/common)
|
||||
* `keyword_path` - path to the `.ppn` keyword file
|
||||
* `sensitivity` - model sensitivity (0-1, default 0.5)
|
||||
* `command` - configuration for external speech-to-text program
|
||||
* `program` - path to executable
|
||||
* `arguments` - list of arguments to pass to program
|
||||
* `microphone` - configuration for audio recording
|
||||
* `system` - audio recording system (`pyaudio`, `arecord`, `hermes`, `http`, or `dummy`)
|
||||
* `system` - audio recording system (`pyaudio`, `arecord`, `hermes`, or `dummy`)
|
||||
* `pyaudio` - configuration for [PyAudio](https://people.csail.mit.edu/hubert/pyaudio/) microphone
|
||||
* `device` - index of device to use or empty for default device
|
||||
* `frames_per_buffer` - number of frames to read at a time (default 480)
|
||||
* `arecord` - configuration for ALSA microphone
|
||||
* `device` - name of ALSA device (see `arecord -L`) to use or empty for default device
|
||||
* `chunk_size` - number of bytes to read at a time (default 960)
|
||||
* `http` - configuration for HTTP audio stream
|
||||
* `host` - hostname or IP address of HTTP audio server (default 127.0.0.1)
|
||||
* `port` - port to receive audio stream on (default 12333)
|
||||
* `stop_after` - one of "never", "text", or "intent" ([see documentation](audio-input.md#http-stream))
|
||||
* `gstreamer` - configuration for GStreamer audio recorder
|
||||
* `pipeline` - GStreamer pipeline (e.g., `FILTER ! FILTER ! ...`) without sink
|
||||
* `hermes` - configuration for MQTT "microphone" ([Hermes protocol](https://docs.snips.ai/ressources/hermes-protocol))
|
||||
* Subscribes to WAV data from `hermes/audioServer/<SITE_ID>/audioFrame`
|
||||
* Requires MQTT to be enabled
|
||||
@@ -251,15 +226,3 @@ All available profile sections and settings are listed below:
|
||||
* `system` - system for tuning (currently only `sphinxtrain`)
|
||||
* `sphinxtrain` - configuration for [sphinxtrain](https://github.com/cmusphinx/sphinxtrain) based acoustic model tuning
|
||||
* `mllr_matrix` - name of generated MLLR matrix (should match `speech_to_text.pocketsphinx.mllr_matrix`)
|
||||
* `download` - configuration for profile file downloading
|
||||
* `cache_dir` - directory in your profile where downloaded files are cached
|
||||
* `conditions` - profile settings that will trigger file downloads
|
||||
* keys are profile setting paths (e.g., `wake.system`)
|
||||
* values are dictionaries whose keys are profile settings values (e.g., `snowboy`)
|
||||
* settings may have the form `<=N` or `!X` to mean "less than or equal to N" or "not X"
|
||||
* leaf nodes are dictionaries whose keys are destination file paths and whose values reference the `files` dictionary
|
||||
* `files` - locations, etc. of files to download
|
||||
* keys are names of files
|
||||
* values are dictionaries with:
|
||||
* `url` - URL of file to download
|
||||
* `cache` - `false` if file should be downloaded directly into profile (skipping cache)
|
||||
|
||||
+12
-13
@@ -4,10 +4,10 @@ Rhasspy's primary function is convert voice commands to JSON events. The first s
|
||||
|
||||
The following table summarizes language support for the various speech to text systems:
|
||||
|
||||
| System | en | de | es | fr | it | nl | ru | el | hi | zh | vi | pt | ca |
|
||||
| ------ | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |
|
||||
| [pocketsphinx](speech-to-text.md#pocketsphinx) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ |
|
||||
| [kaldi](speech-to-text.md#kaldi) | ✓ | ✓ | | | | ✓ | | | | | ✓ | | |
|
||||
| System | en | de | es | fr | it | nl | ru | el | hi | zh | vi | pt |
|
||||
| ------ | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |
|
||||
| [pocketsphinx](speech-to-text.md#pocketsphinx) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||
| [kaldi](speech-to-text.md#kaldi) | | | | | | | | | | | ✓ | ✓ |
|
||||
|
||||
## Pocketsphinx
|
||||
|
||||
@@ -24,7 +24,9 @@ Add to your [profile](profiles.md):
|
||||
"base_dictionary": "base_dictionary.txt",
|
||||
"custom_words": "custom_words.txt",
|
||||
"dictionary": "dictionary.txt",
|
||||
"language_model": "language_model.txt"
|
||||
"language_model": "language_model.txt",
|
||||
"unknown_words": "unknown_words.txt",
|
||||
"mllr_matrix": "acoustic_model_mllr"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -36,10 +38,11 @@ When Rhasspy starts, it creates a pocketsphinx decoder with the following attrib
|
||||
* `hmm` - `speech_to_text.pocketsphinx.acoustic_model` (directory)
|
||||
* `dict` - `speech_to_text.pocketsphinx.dictionary` (file)
|
||||
* `lm` - `speech_to_text.pocketsphinx.language_model` (file)
|
||||
* `mllr` - `speech_to_text.pocketsphinx.mllr_matrix` (file, optional)
|
||||
|
||||
### Open Transcription
|
||||
The `mllr_matrix` file is intended for advanced users who want to [tune/adapt their acoustic models](https://cmusphinx.github.io/wiki/tutorialadapt). This can increase the performance of Rhasspy's speech recognition for a specific user/microphone/acoustic environment.
|
||||
|
||||
If you just want to use Rhasspy for general speech to text, you can set `speech_to_text.pocketsphinx.open_transcription` to `true` in your profile. This will use the included general language model (much slower) and ignore any custom voice commands you've specified. For English, German, and Dutch, you may want to use [Kaldi](#kaldi) instead for better results.
|
||||
Pocketsphinx allows Rhasspy to support Enlgish (en), German (de), Dutch (nl), Spanish (es), Italian (it), French (fr), Greek (el), Russian (ru), Hindi (hi), and Mandarin (zh).
|
||||
|
||||
See `rhasspy.stt.PocketsphinxDecoder` for details.
|
||||
|
||||
@@ -73,10 +76,6 @@ This requires Kaldi to be installed, which is...challenging. The [Docker image o
|
||||
|
||||
Rhasspy expects a Kaldi-compatible profile to contain a `model` directory with a `train.sh` and `decode.sh` script. See the Vietnamese (vi) or Portuguese (pt) [profile](https://github.com/synesthesiam/rhasspy-profiles/releases) for an example.
|
||||
|
||||
### Open Transcription
|
||||
|
||||
If you just want to use Rhasspy for general speech to text, you can set `speech_to_text.kaldi.open_transcription` to `true` in your profile. This will use the included general language model (much slower) and ignore any custom voice commands you've specified.
|
||||
|
||||
## Remote HTTP Server
|
||||
|
||||
Uses a remote HTTP server to transform speech (WAV) to text.
|
||||
@@ -94,7 +93,7 @@ Add to your [profile](profiles.md):
|
||||
}
|
||||
```
|
||||
|
||||
During speech recognition, 16-bit 16 kHz mono WAV data will be POST-ed to the endpoint with the `Content-Type` set to `audio/wav`. A `text/plain` response with the transcription is expected back. An additional `profile` query argument is sent with the current profile name, so the POST URL is effectively something like `http://remote-server:12101/api/speech-to-text?profile=en`.
|
||||
During speech recognition, 16-bit 16Khz mono WAV data will be POST-ed to the endpoint with the `Content-Type` set to `audio/wav`. A `text/plain` response with the transcription is expected back. An additional `profile` query argument is sent with the current profile name, so the POST URL is effectively something like `http://remote-server:12101/api/speech-to-text?profile=en`.
|
||||
|
||||
See `rhasspy.stt.RemoteDecoder` for details.
|
||||
|
||||
@@ -116,7 +115,7 @@ Add to your [profile](profiles.md):
|
||||
}
|
||||
```
|
||||
|
||||
When a voice command is received, Rhasspy will call your program and push the recorded WAV data (16-bit 16 kHz mono) to standard in. Your program should print the text transcription to standard out.
|
||||
When a voice command is received, Rhasspy will call your program and push the recorded WAV data (16-bit 16 Khz mono) to standard in. Your program should print the text transcription to standard out.
|
||||
|
||||
The following environment variables are available to your program:
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@ After you voice command has been [handled](intent-handling.md), it's common to p
|
||||
|
||||
The following table summarizes language support for the various text to speech systems:
|
||||
|
||||
| System | en | de | es | fr | it | nl | ru | el | hi | zh | vi | pt | ca |
|
||||
| ------ | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |
|
||||
| [espeak](text-to-speech.md#espeak) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| [flite](text-to-speech.md#flite) | ✓ | | | | | | | | ✓ | | | | |
|
||||
| [picotts](text-to-speech.md#picotts) | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | |
|
||||
| [marytts](text-to-speech.md#marytts) | ✓ | ✓ | | ✓ | ✓ | | ✓ | | | | | | |
|
||||
| [wavenet](text-to-speech.md#google-wavenet) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ | |
|
||||
| System | en | de | es | fr | it | nl | ru | el | hi | zh | vi | pt |
|
||||
| ------ | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |
|
||||
| [espeak](text-to-speech.md#espeak) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| [flite](text-to-speech.md#flite) | ✓ | | | | | | | | ✓ | | | |
|
||||
| [picotts](text-to-speech.md#picotts) | ✓ | | | | | | | | | | | |
|
||||
| [marytts](text-to-speech.md#marytts) | ✓ | ✓ | | ✓ | ✓ | | ✓ | | | | | |
|
||||
| [wavenet](text-to-speech.md#google-wavenet) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ |
|
||||
|
||||
## eSpeak
|
||||
|
||||
@@ -159,7 +159,7 @@ Add to your [profile](profiles.md):
|
||||
}
|
||||
```
|
||||
|
||||
For compatibility with other services and Rhasspy components, it's best to return 16 kHz, 16-bit mono WAV data.
|
||||
For compatibility with other services and Rhasspy components, it's best to return 16 Khz, 16-bit mono WAV data.
|
||||
|
||||
See `rhasspy.tts.CommandSentenceSpeaker` for details.
|
||||
|
||||
|
||||
+7
-7
@@ -1,8 +1,8 @@
|
||||
# Training
|
||||
|
||||
Rhasspy is designed to recognize voice commands that [you provide](#sentencesini). These commands are categorized by **intent**, and may contain variable **slots** or **entities**, such as the color and name of a light.
|
||||
Rhasspy is designed to recognize only the specific set of voice commands that [you provide](#sentencesini). These commands are categorized by **intent**, and may contain variable **slots** or **entities**, such as the color and name of a light.
|
||||
|
||||
During the training process, Rhasspy simultaneously trains *both* a speech and intent recognizer. The speech recognizer converts voice commands to text, and the intent recognizer converts text to JSON events. Combined, they enable a low power, offline system like a Raspberry Pi to understand and respond to your voice commands.
|
||||
During the training process, Rhasspy simulataneously trains *both* a speech and intent recognizer. The speech recognizer converts voice commands to text, and the intent recognizer converts text to JSON events. Combined, they enable a low power, offline system like a Raspberry Pi to understand and respond to your voice commands.
|
||||
|
||||
## How It Works
|
||||
|
||||
@@ -38,7 +38,7 @@ For step (4), Rhasspy can use a [variety of intent recognition systems](intent-r
|
||||
|
||||
and provided as training material to the intent recognition system. The [fuzzywuzzy](intent-recognition.md#fuzzywuzzy) system, for example, simply saves the JSON file and, during recognition, finds the closest matching sentence according to the [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance). The [default intent recognizer](intent-recognition.md#fsticuffs) interacts directly with the finite state transducer(s) generated in step (1) and, while less tolerant of errors than `fuzzywuzzy`, is significantly faster for large sets of voice commands (i.e., millions).
|
||||
|
||||
More sophisticated systems like [Rasa NLU](intent-recognition.md#rasanlu) use machine learning techniques to classify sentences by intent and assign slot (entity) values. These systems are much better at recognizing sentences not seen during training, but can take minutes to hours to train.
|
||||
More sophisticated systems like [rasaNLU](intent-recognition.md#rasanlu) use machine learning techniques to classify sentences by intent and assign slota (entity) values. These systems are much better at recognizing sentences not seen during training, but can take minutes to hours to train.
|
||||
|
||||
## sentences.ini
|
||||
|
||||
@@ -65,7 +65,7 @@ Compared to JSON, YAML, etc., there is minimal syntactic overhead for the purpos
|
||||
3. You cannot share commonly *repeated phrases* across sentences or intents.
|
||||
4. There is no way to *tag phrases* so the intent recognizer knows the values for an intent's slots (e.g., color).
|
||||
|
||||
Each of these shortcomings are addressed by considering the space between intent headings (`[Intent 1]`, etc.) as a **grammar** that represent many possible voice commands. The possible sentences, stripped of their tags, are used as input to [opengrm](https://www.opengrm.org) to produce a standard ARPA language model for [pocketsphinx](https://github.com/cmusphinx/pocketsphinx) or [Kaldi](https://kaldi-asr.org). The tagged sentences are then used to train an intent recognizer.
|
||||
Each of these shortcomings are addressed by considering the space between intent headings (`[Intent 1]`, etc.) as a **grammar** that will *generate* tagged sentences in [rasaNLU's training data format](https://rasa.com/docs/nlu/dataformat/#markdown-format). The generated sentences, stripped of their tags, are used as input to [opengrm](https://www.opengrm.org) to produce a language model for [pocketsphinx](https://github.com/cmusphinx/pocketsphinx) or [Kaldi](https://kaldi-asr.org). The tagged sentences are then used to train an intent recognizer.
|
||||
|
||||
### Optional Words
|
||||
|
||||
@@ -180,7 +180,7 @@ In the `SetLightColor` example above, the color names are stored in `sentences.i
|
||||
|
||||
colors = (red | green | blue)
|
||||
|
||||
This is convenient when the list of colors is small, changes infrequently, and does not depend on an external service.
|
||||
Ths is convenient when the list of colors is small, changes infrequently, and does not depend on an external service.
|
||||
But what if this was a list of movie names that were stored on your [Kodi Home Theater](https://kodi.tv)?
|
||||
|
||||
movies = ("Primer" | "Moon" | "Chronicle" | "Timecrimes" | "Mulholland Drive" | ... )
|
||||
@@ -399,7 +399,7 @@ During training, Rhasspy can **mix** this large, open ended language model with
|
||||
|
||||

|
||||
|
||||
To see the effect of language model mixing, consider a simple `sentences.ini` file:
|
||||
To see the effect of language model mixing, consder a simple `sentences.ini` file:
|
||||
|
||||
```
|
||||
[ChangeLightState]
|
||||
@@ -433,7 +433,7 @@ $ rhasspy-cli --profile en \
|
||||
OK
|
||||
```
|
||||
|
||||
Note that training will take **significantly** longer because of the size of the base language model. Now, let's test our two WAV files:
|
||||
Note that training will take **significantly** longer because of the size of the base langauge model. Now, let's test our two WAV files:
|
||||
|
||||
```
|
||||
$ rhasspy-cli --profile en wav2text < turn_on_living_room_lamp.wav
|
||||
|
||||
+6
-8
@@ -77,14 +77,12 @@ Rhasspy features a comprehensive HTTP API available at `/api`, documented with [
|
||||
* POST text and have Rhasspy process it as command
|
||||
* `/api/text-to-speech`
|
||||
* POST text and have Rhasspy speak it
|
||||
* `/api/slots`
|
||||
* POST JSON to update [slot values](training.md#slots-lists)
|
||||
|
||||
See `public/swagger.yaml` in Rhasspy's repository for all available endpoints, or visit `/api` on your Rhasspy web server (e.g., [http://localhost:12101/api](http://localhost:12101/api)).
|
||||
See `public/swagger.yaml` in Rhasspy's repository for all available endpoints, or visit `/api` on your Rhasspy web server (e.g., [http://locahost:12101/api](http://localhost:12101/api)).
|
||||
|
||||
## Secure Hosting with HTTPS
|
||||
|
||||
If you need to access Rhasspy's web interface/API through HTTPS (formally SSL), you can provide a certificate and key file via command-line parameters or the Hass.io configuration.
|
||||
If you need to access Rhasspy's web interface/API through HTTPS (formally SSL), you can provide a certificate and key file via command-line parameters or the Hass.IO configuration.
|
||||
|
||||
If you're running Rhasspy via Docker or in a virtual environment, add `--ssl <CERT_FILE> <KEY_FILE>` to the command-line arguments where `<CERT_FILE>` is your SSL certificate and `<KEY_FILE>` is your SSL key file.
|
||||
|
||||
@@ -96,9 +94,9 @@ After answering the series of questions, you should have `cert.pem` and `key.pem
|
||||
|
||||
<RHASSPY COMMAND> --ssl cert.pem key.pem
|
||||
|
||||
The web interface will now be available at [https://localhost:12101](https://localhost:12101) and the web socket events at `wss://localhost:12101/api/events/intent`
|
||||
The web interface will now be available at [https://localhost:12101](https://locahost:12101) and the web socket events at `wss://localhost:12101/api/events/intent`
|
||||
|
||||
In Hass.io, you will need to set the following options via the web interface or in your JSON configuration:
|
||||
In Hass.IO, you will need to set the following options via the web interface or in your JSON configuration:
|
||||
|
||||
* `ssl`: `true`
|
||||
* `certfile`: `cert.pem`
|
||||
@@ -191,7 +189,7 @@ If you run Rhasspy through [Docker](installation.md#docker), the [rhasspy-cli](h
|
||||
Put this script in your `~/bin` directory so that you can refer to it as `rhasspy-cli` from any directory.
|
||||
By default, it will look for profiles in `$XDG_CONFIG_FILE/rhasspy/profiles`, which is probably `~/.config/rhasspy/profiles` (see [XDG specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) for more information).
|
||||
|
||||
**Beware**: the `rhasspy-cli` script runs under your user account and grants Rhasspy **write access to your home directory**.
|
||||
**Beware**: the `rhasspy-cli` script run under your user accout and grants Rhasspy **write access to your home directory**.
|
||||
This is needed to save files during the training process, and to avoid those files being owned by `root`.
|
||||
The [rhasspy-cli-ro](https://github.com/synesthesiam/rhasspy/blob/master/bin/rhasspy-cli-ro) script can be used for read only operations, such as speech to text or intent handling, but cannot make any changes to your file system.
|
||||
|
||||
@@ -252,7 +250,7 @@ For `rhasspy-cli --profile <PROFILE_NAME> <COMMAND> <ARGUMENTS>`, `<COMMAND>` ca
|
||||
|
||||
### Profile Operations
|
||||
|
||||
Print the complete JSON for the English profile with:
|
||||
Print the complete JSON for the Enlgish profile with:
|
||||
|
||||
rhasspy-cli --profile en info
|
||||
|
||||
|
||||
+36
-65
@@ -6,71 +6,11 @@ You can also wake Rhasspy up using the [HTTP API](usage.md#http-api) by POST-ing
|
||||
|
||||
The following table summarizes the key characteristics of each wake word system:
|
||||
|
||||
| System | Performance | Training to Customize | Online Sign Up |
|
||||
| ------ | ----------- | ----------------- | ----------------------- |
|
||||
| [porcupine](wake-word.md#porcupine) | excellent | yes, offline | no |
|
||||
| [snowboy](wake-word.md#snowboy) | good | yes, online | yes |
|
||||
| [pocketsphinx](wake-word.md#pocketsphinx) | poor | no | no |
|
||||
| [precise](wake-word.md#mycroft-precise) | moderate | yes, offline | no |
|
||||
|
||||
## Porcupine
|
||||
|
||||
Listens for a wake word with [porcupine](https://github.com/Picovoice/Porcupine). This system has the best performance out of the box. If you want a custom wake word, however, you will need to re-run their optimizer tool every 30 days.
|
||||
|
||||
Add to your [profile](profiles.md):
|
||||
|
||||
```json
|
||||
"wake": {
|
||||
"system": "porcupine",
|
||||
"porcupine": {
|
||||
"library_path": "porcupine/libpv_porcupine.so",
|
||||
"model_path": "porcupine/porcupine_params.pv",
|
||||
"keyword_path": "porcupine/porcupine.ppn",
|
||||
"sensitivity": 0.5
|
||||
}
|
||||
},
|
||||
|
||||
"rhasspy": {
|
||||
"listen_on_start": true
|
||||
}
|
||||
```
|
||||
|
||||
There are a lot of [keyword files](https://github.com/Picovoice/Porcupine/tree/master/resources/keyword_files) available for download. Use the `linux` platform if you're on desktop/laptop (`amd64`) and the `raspberrypi` platform if you're using a Raspberry Pi (`armhf`/`aarch64`). The `.ppn` files should go in the `porcupine` directory inside your profile (referenced by `keyword_path`).
|
||||
|
||||
If you want to create a custom wake word, you will need to run the [Porcupine Optimizer](https://github.com/Picovoice/Porcupine/tree/master/tools/optimizer). **NOTE**: the generated keyword file is only valid for 30 days, though you can always just re-run the optimizer.
|
||||
|
||||
See `rhasspy.wake.PorcupineWakeListener` for details.
|
||||
|
||||
## Snowboy
|
||||
|
||||
Listens for a wake word with [snowboy](https://snowboy.kitt.ai). This system has the good performance out of the box, but requires an online service to train.
|
||||
|
||||
Add to your [profile](profiles.md):
|
||||
|
||||
```json
|
||||
"wake": {
|
||||
"system": "snowboy",
|
||||
"hermes": {
|
||||
"wakeword_id": "default"
|
||||
},
|
||||
"snowboy": {
|
||||
"model": "model-name-in-profile.(u|p)mdl",
|
||||
"audio_gain": 1,
|
||||
"sensitivity": 0.5,
|
||||
"chunk_size": 960
|
||||
}
|
||||
},
|
||||
|
||||
"rhasspy": {
|
||||
"listen_on_start": true
|
||||
}
|
||||
```
|
||||
|
||||
Visit [the snowboy website](https://snowboy.kitt.ai) to train your own wake word model (requires linking to a GitHub/Google/Facebook account). This *personal* model with end with `.pmdl`, and should go in your profile directory. Then, set `wake.snowboy.model` to the name of that file.
|
||||
|
||||
You also have the option of using a pre-train *universal* model (`.umdl`) from [Kitt.AI](https://github.com/Kitt-AI/snowboy/tree/master/resources/models). I've received errors using anything but `snowboy.umdl`, but YMMV.
|
||||
|
||||
See `rhasspy.wake.SnowboyWakeListener` for details.
|
||||
| System | Performance | Requires Training | Requires Online Sign Up |
|
||||
| ------ | ----------- | ----------------- | ----------------------- |
|
||||
| [pocketsphinx](wake-word.md#pocketsphinx) | poor | no | no |
|
||||
| [precise](wake-word.md#mycroft-precise) | moderate | yes, offline | no |
|
||||
| [snowboy](wake-word.md#snowboy) | good | yes, online | yes |
|
||||
|
||||
## Pocketsphinx
|
||||
|
||||
@@ -125,6 +65,37 @@ Follow [the instructions from Mycroft AI](https://github.com/MycroftAI/mycroft-p
|
||||
|
||||
See `rhasspy.wake.PreciseWakeListener` for details.
|
||||
|
||||
## Snowboy
|
||||
|
||||
Listens for a wake word with [snowboy](https://snowboy.kitt.ai). This system has the best performance out of the box, but requires an online service to train.
|
||||
|
||||
Add to your [profile](profiles.md):
|
||||
|
||||
```json
|
||||
"wake": {
|
||||
"system": "snowboy",
|
||||
"hermes": {
|
||||
"wakeword_id": "default"
|
||||
},
|
||||
"snowboy": {
|
||||
"model": "model-name-in-profile.(u|p)mdl",
|
||||
"audio_gain": 1,
|
||||
"sensitivity": 0.5,
|
||||
"chunk_size": 960
|
||||
}
|
||||
},
|
||||
|
||||
"rhasspy": {
|
||||
"listen_on_start": true
|
||||
}
|
||||
```
|
||||
|
||||
Visit [the snowboy website](https://snowboy.kitt.ai) to train your own wake word model (requires linking to a GitHub/Google/Facebook account). This *personal* model with end with `.pmdl`, and should go in your profile directory. Then, set `wake.snowboy.model` to the name of that file.
|
||||
|
||||
You also have the option of using a pre-train *universal* model (`.umdl`) from [Kitt.AI](https://github.com/Kitt-AI/snowboy/tree/master/resources/models). I've received errors using anything but `snowboy.umdl`, but YMMV.
|
||||
|
||||
See `rhasspy.wake.SnowboyWakeListener` for details.
|
||||
|
||||
## MQTT/Hermes
|
||||
|
||||
Subscribes to the `hermes/hotword/<WAKEWORD_ID>/detected` topic, and wakes Rhasspy up when a message is received ([Hermes protocol](https://docs.snips.ai/ressources/hermes-protocol)). This allows Rhasspy to use the wake word functionality in [Snips.AI](https://snips.ai/).
|
||||
|
||||
+91
-100
@@ -1,139 +1,130 @@
|
||||
#!/usr/bin/env bash
|
||||
this_dir="$( cd "$( dirname "$0" )" && pwd )"
|
||||
cpu_arch=$(uname --m)
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Command-line Arguments
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
. "${this_dir}/etc/shflags"
|
||||
|
||||
DEFINE_string 'download-dir' "${this_dir}/download" 'Directory to cache downloaded files'
|
||||
DEFINE_boolean 'precise' true 'Install Mycroft Precise'
|
||||
DEFINE_boolean 'kaldi' true 'Install Kaldi'
|
||||
DEFINE_boolean 'offline' false "Don't download anything"
|
||||
DEFINE_boolean 'all-cpu' false 'Download dependencies for all CPU architectures'
|
||||
DEFINE_string 'cpu-arch' "${cpu_arch}" 'CPU architecture (x86_64, armv7l, arm64v8)'
|
||||
|
||||
FLAGS "$@" || exit $?
|
||||
eval set -- "${FLAGS_ARGV}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Default Settings
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
set -e
|
||||
|
||||
cpu_arch="${FLAGS_cpu_arch}"
|
||||
download_dir="${FLAGS_download_dir}"
|
||||
# Directory of *this* script
|
||||
DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||
|
||||
# Place where downloaded artifacts are stored
|
||||
download_dir="${DIR}/download"
|
||||
mkdir -p "${download_dir}"
|
||||
|
||||
if [[ "${FLAGS_offline}" -eq "${FLAGS_TRUE}" ]]; then
|
||||
offline='true'
|
||||
fi
|
||||
|
||||
if [[ "${FLAGS_all_cpu}" -eq "${FLAGS_TRUE}" ]]; then
|
||||
all_cpu='true'
|
||||
fi
|
||||
|
||||
if [[ "${FLAGS_precise}" -eq "${FLAGS_FALSE}" ]]; then
|
||||
no_precise='true'
|
||||
fi
|
||||
|
||||
if [[ "${FLAGS_kaldi}" -eq "${FLAGS_FALSE}" ]]; then
|
||||
no_kaldi='true'
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
function maybe_download {
|
||||
if [[ ! -f "$2" ]]; then
|
||||
if [[ ! -z "${offline}" ]]; then
|
||||
echo "Need to download $1 but offline."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "$(dirname "$2")"
|
||||
curl -sSfL -o "$2" "$1"
|
||||
echo "$1 => $2"
|
||||
fi
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# CPU architecture
|
||||
CPU_ARCHS=("x86_64" "armv7l" "arm64v8")
|
||||
FRIENDLY_ARCHS=("amd64" "armhf" "aarch64")
|
||||
|
||||
declare -A CPU_TO_FRIENDLY
|
||||
CPU_TO_FRIENDLY["x86_64"]="amd64"
|
||||
CPU_TO_FRIENDLY["armv7l"]="armhf"
|
||||
CPU_TO_FRIENDLY["arm64v8"]="aarch64"
|
||||
|
||||
# CPU architecture
|
||||
if [[ ! -z "${all_cpu}" ]]; then
|
||||
CPU_ARCHS=("x86_64" "armv7l" "arm64v8")
|
||||
FRIENDLY_ARCHS=("amd64" "armhf" "aarch64")
|
||||
else
|
||||
CPU_ARCHS=("${cpu_arch}")
|
||||
FRIENDLY_ARCHS=("${CPU_TO_FRIENDLY[${cpu_arch}]}")
|
||||
# -----------------------------------------------------------------------------
|
||||
# OpenFST
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
openfst_file="${download_dir}/openfst-1.6.2.tar.gz"
|
||||
if [[ ! -f "${openfst_file}" ]]; then
|
||||
openfst_url='http://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.6.2.tar.gz'
|
||||
echo "Downloading OpenFST source (${openfst_url})"
|
||||
curl -sSfL -o "${openfst_file}" "${openfst_url}"
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Rhasspy
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
for FRIENDLY_ARCH in "${FRIENDLY_ARCHS[@]}";
|
||||
do
|
||||
rhasspy_files=("rhasspy-tools_${FRIENDLY_ARCH}.tar.gz" "rhasspy-web-dist.tar.gz")
|
||||
for rhasspy_file_name in "${rhasspy_files}"; do
|
||||
rhasspy_file="${download_dir}/${rhasspy_file_name}"
|
||||
rhasspy_file_url="https://github.com/synesthesiam/rhasspy/releases/download/v2.0/${rhasspy_file_name}"
|
||||
maybe_download "${rhasspy_file_url}" "${rhasspy_file}"
|
||||
done
|
||||
done
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Pocketsphinx for Python
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
pocketsphinx_file="${download_dir}/pocketsphinx-python.tar.gz"
|
||||
pocketsphinx_url='https://github.com/synesthesiam/pocketsphinx-python/releases/download/v1.0/pocketsphinx-python.tar.gz'
|
||||
maybe_download "${pocketsphinx_url}" "${pocketsphinx_file}"
|
||||
if [[ ! -f "${pocketsphinx_file}" ]]; then
|
||||
pocketsphinx_url='https://github.com/synesthesiam/pocketsphinx-python/releases/download/v1.0/pocketsphinx-python.tar.gz'
|
||||
echo "Downloading pocketsphinx (${pocketsphinx_url})"
|
||||
curl -sSfL -o "${pocketsphinx_file}" "${pocketsphinx_url}"
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# jsgf2fst
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
jsgf2fst_file="${download_dir}/jsgf2fst-0.1.0.tar.gz"
|
||||
if [[ ! -f "${jsgf2fst_file}" ]]; then
|
||||
jsgf2fst_url='https://github.com/synesthesiam/jsgf2fst/releases/download/v0.1.0/jsgf2fst-0.1.0.tar.gz'
|
||||
echo "Downloading jsgf2fst (${jsgf2fst_url})"
|
||||
curl -sSfL -o "${jsgf2fst_file}" "${jsgf2fst_url}"
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Snowboy
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
snowboy_file="${download_dir}/snowboy-1.3.0.tar.gz"
|
||||
snowboy_url='https://github.com/Kitt-AI/snowboy/archive/v1.3.0.tar.gz'
|
||||
maybe_download "${snowboy_url}" "${snowboy_file}"
|
||||
if [[ ! -f "${snowboy_file}" ]]; then
|
||||
snowboy_url='https://github.com/Kitt-AI/snowboy/archive/v1.3.0.tar.gz'
|
||||
echo "Downloading snowboy (${snowboy_url})"
|
||||
curl -sSfL -o "${snowboy_file}" "${snowboy_url}"
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Mycroft Precise
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
if [[ -z "${no_precise}" ]]; then
|
||||
for CPU_ARCH in "${CPU_ARCHS}";
|
||||
do
|
||||
case $CPU_ARCH in
|
||||
x86_64|armv7l)
|
||||
precise_file="${download_dir}/precise-engine_0.3.0_${CPU_ARCH}.tar.gz"
|
||||
precise_url="https://github.com/MycroftAI/mycroft-precise/releases/download/v0.3.0/precise-engine_0.3.0_${CPU_ARCH}.tar.gz"
|
||||
maybe_download "${precise_url}" "${precise_file}"
|
||||
esac
|
||||
done
|
||||
for CPU_ARCH in "x86_64" "armv7l"
|
||||
do
|
||||
precise_file="${download_dir}/precise-engine_0.3.0_${CPU_ARCH}.tar.gz"
|
||||
if [[ ! -f "${precise_file}" ]]; then
|
||||
precise_url="https://github.com/MycroftAI/mycroft-precise/releases/download/v0.3.0/precise-engine_0.3.0_${CPU_ARCH}.tar.gz"
|
||||
echo "Downloading Mycroft Precise (${precise_url})"
|
||||
curl -sSfL -o "${precise_file}" "${precise_url}"
|
||||
fi
|
||||
done
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Opengrm
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
if [[ -z "$(which ngramcount)" ]]; then
|
||||
opengrm_file="${download_dir}/opengrm-ngram-1.3.3.tar.gz"
|
||||
if [[ ! -f "${opengrm_file}" ]]; then
|
||||
opengrm_url='https://www.opengrm.org/twiki/pub/GRM/NGramDownload/opengrm-ngram-1.3.3.tar.gz'
|
||||
echo "Download Opengrm (${opengrm_url})"
|
||||
curl -sSfLk -o "${opengrm_file}" "${opengrm_url}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Phonetisaurus
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
for FRIENDLY_ARCH in "${FRIENDLY_ARCHS[@]}"
|
||||
do
|
||||
# Install pre-built package
|
||||
phonetisaurus_file="${download_dir}/phonetisaurus-2019_${FRIENDLY_ARCH}.deb"
|
||||
if [[ ! -f "${phonetisaurus_file}" ]]; then
|
||||
phonetisaurus_url="https://github.com/synesthesiam/phonetisaurus-2019/releases/download/v1.0/phonetisaurus-2019_${FRIENDLY_ARCH}.deb"
|
||||
echo "Downloading phonetisaurus (${phonetisaurus_url})"
|
||||
curl -sSfL -o "${phonetisaurus_file}" "${phonetisaurus_url}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Build from source
|
||||
phonetisaurus_file="${download_dir}/phonetisaurus-2019.zip"
|
||||
if [[ ! -f "${phonetisaurus_file}" ]]; then
|
||||
phonetisaurus_url="https://github.com/synesthesiam/phonetisaurus-2019/releases/download/v1.0/phonetisaurus-2019_${FRIENDLY_ARCH}.deb"
|
||||
echo "Downloading phonetisaurus source (${phonetisaurus_url})"
|
||||
curl -sSfL -o "${phonetisaurus_file}" "${phonetisaurus_url}"
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Kaldi
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
if [[ -z "${no_kaldi}" ]]; then
|
||||
for FRIENDLY_ARCH in "${FRIENDLY_ARCHS}"
|
||||
do
|
||||
# Install pre-built package
|
||||
kaldi_file="${download_dir}/kaldi_${FRIENDLY_ARCH}.tar.gz"
|
||||
for FRIENDLY_ARCH in "${FRIENDLY_ARCHS[@]}"
|
||||
do
|
||||
# Install pre-built package
|
||||
kaldi_file="${download_dir}/kaldi_${FRIENDLY_ARCH}.tar.gz"
|
||||
if [[ ! -f "${kaldi_file}" ]]; then
|
||||
kaldi_url="https://github.com/synesthesiam/kaldi-docker/releases/download/v1.0/kaldi_${FRIENDLY_ARCH}.tar.gz"
|
||||
maybe_download "${kaldi_url}" "${kaldi_file}"
|
||||
done
|
||||
fi
|
||||
echo "Downloading kaldi (${kaldi_url})"
|
||||
curl -sSfL -o "${kaldi_file}" "${kaldi_url}"
|
||||
fi
|
||||
done
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
-1206
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"text": "σβήσε το φως του γκαράζ",
|
||||
"text": "ενεργοποιήστε τη λάμπα του καθιστικού",
|
||||
"intent": {
|
||||
"name": "ChangeLightState"
|
||||
},
|
||||
"entities": {
|
||||
"name": "γκαράζ",
|
||||
"state": "σβήσε"
|
||||
"name": "καθιστικού",
|
||||
"state": "ενεργοποιήστε"
|
||||
},
|
||||
"words": {
|
||||
"known": {
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
"words": {
|
||||
"known": {
|
||||
"word": "tempo",
|
||||
"phonemes": "t e~ p u"
|
||||
"phonemes": "T E~+ P UX"
|
||||
},
|
||||
"unknown": {
|
||||
"word": "tempoada",
|
||||
"phonemes": "t e~ p o a d a"
|
||||
"phonemes": "T E~ P O A+ D AX"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"text": "är garage dörren öppen",
|
||||
"intent": {
|
||||
"name": "GetGarageState"
|
||||
},
|
||||
"entities": {
|
||||
},
|
||||
"words": {
|
||||
"known": {
|
||||
"word": "klockan",
|
||||
"phonemes": "k l ol s k abl n"
|
||||
},
|
||||
"unknown": {
|
||||
"word": "klockanklacken",
|
||||
"phonemes": "k l ol s k abl n k l a k el n"
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -27,7 +27,7 @@
|
||||
"intent": {
|
||||
"system": "remote",
|
||||
"rasa": {
|
||||
"url": "http://localhost:5005/"
|
||||
"url": "http://localhost:5000/"
|
||||
},
|
||||
"remote": {
|
||||
"url": "http://server:12101/api/text-to-intent"
|
||||
@@ -70,4 +70,4 @@
|
||||
"username": "",
|
||||
"site_id": "default"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@
|
||||
"intent": {
|
||||
"system": "fuzzywuzzy",
|
||||
"rasa": {
|
||||
"url": "http://localhost:5005/"
|
||||
"url": "http://localhost:5000/"
|
||||
},
|
||||
"remote": {
|
||||
"url": "http://my-server:12101/api/text-to-intent"
|
||||
@@ -73,4 +73,4 @@
|
||||
"username": "",
|
||||
"site_id": "default"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@
|
||||
"intent": {
|
||||
"system": "fuzzywuzzy",
|
||||
"rasa": {
|
||||
"url": "http://localhost:5005/"
|
||||
"url": "http://localhost:5000/"
|
||||
},
|
||||
"remote": {
|
||||
"url": "http://my-server:12101/api/text-to-intent"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"intent": {
|
||||
"system": "fuzzywuzzy",
|
||||
"rasa": {
|
||||
"url": "http://localhost:5005/"
|
||||
"url": "http://localhost:5000/"
|
||||
},
|
||||
"remote": {
|
||||
"url": "http://my-server:12101/api/text-to-intent"
|
||||
|
||||
@@ -52,10 +52,4 @@ ignore_missing_imports = True
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy-cerberus.*]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy-flair.*]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy-google.*]
|
||||
ignore_missing_imports = True
|
||||
-168
@@ -1,168 +0,0 @@
|
||||
#
|
||||
# Copyright 2018 Picovoice Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
import os
|
||||
from ctypes import *
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class Porcupine(object):
|
||||
"""Python binding for Picovoice's wake word detection (aka Porcupine) library."""
|
||||
|
||||
class PicovoiceStatuses(Enum):
|
||||
"""Status codes corresponding to 'pv_status_t' defined in 'include/picovoice.h'"""
|
||||
|
||||
SUCCESS = 0
|
||||
OUT_OF_MEMORY = 1
|
||||
IO_ERROR = 2
|
||||
INVALID_ARGUMENT = 3
|
||||
|
||||
_PICOVOICE_STATUS_TO_EXCEPTION = {
|
||||
PicovoiceStatuses.OUT_OF_MEMORY: MemoryError,
|
||||
PicovoiceStatuses.IO_ERROR: IOError,
|
||||
PicovoiceStatuses.INVALID_ARGUMENT: ValueError
|
||||
}
|
||||
|
||||
class CPorcupine(Structure):
|
||||
pass
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
library_path,
|
||||
model_file_path,
|
||||
keyword_file_path=None,
|
||||
sensitivity=None,
|
||||
keyword_file_paths=None,
|
||||
sensitivities=None):
|
||||
"""
|
||||
Loads Porcupine's shared library and creates an instance of wake word detection object.
|
||||
|
||||
:param library_path: Absolute path to Porcupine's shared library.
|
||||
:param model_file_path: Absolute path to file containing model parameters.
|
||||
:param keyword_file_path: Absolute path to keyword file containing hyper-parameters. If not present then
|
||||
'keyword_file_paths' will be used.
|
||||
:param sensitivity: Sensitivity parameter. A higher sensitivity value lowers miss rate at the cost of increased
|
||||
false alarm rate. For more information regarding this parameter refer to 'include/pv_porcupine.h'. If not
|
||||
present then 'sensitivities' is used.
|
||||
:param keyword_file_paths: List of absolute paths to keyword files. Intended to be used for multiple keyword
|
||||
scenario. This parameter is used only when 'keyword_file_path' is not set.
|
||||
:param sensitivities: List of sensitivity parameters. Intended to be used for multiple keyword scenario. This
|
||||
parameter is used only when 'sensitivity' is not set.
|
||||
"""
|
||||
|
||||
if not os.path.exists(library_path):
|
||||
raise IOError("Could not find Porcupine's library at '%s'" % library_path)
|
||||
|
||||
library = cdll.LoadLibrary(library_path)
|
||||
|
||||
if not os.path.exists(model_file_path):
|
||||
raise IOError("Could not find model file at '%s'" % model_file_path)
|
||||
|
||||
if sensitivity is not None and keyword_file_path is not None:
|
||||
if not os.path.exists(keyword_file_path):
|
||||
raise IOError("Could not find keyword file at '%s'" % keyword_file_path)
|
||||
keyword_file_paths = [keyword_file_path]
|
||||
|
||||
if not (0 <= sensitivity <= 1):
|
||||
raise ValueError('Sensitivity should be within [0, 1]')
|
||||
sensitivities = [sensitivity]
|
||||
elif sensitivities is not None and keyword_file_paths is not None:
|
||||
if len(keyword_file_paths) != len(sensitivities):
|
||||
raise ValueError("Different number of sensitivity and keyword file path parameters are provided.")
|
||||
|
||||
for x in keyword_file_paths:
|
||||
if not os.path.exists(os.path.expanduser(x)):
|
||||
raise IOError("Could not find keyword file at '%s'" % x)
|
||||
|
||||
for x in sensitivities:
|
||||
if not (0 <= x <= 1):
|
||||
raise ValueError('Sensitivity should be within [0, 1]')
|
||||
else:
|
||||
raise ValueError("Sensitivity and/or keyword file path is missing")
|
||||
|
||||
self._num_keywords = len(keyword_file_paths)
|
||||
|
||||
init_func = library.pv_porcupine_multiple_keywords_init
|
||||
init_func.argtypes = [
|
||||
c_char_p,
|
||||
c_int,
|
||||
POINTER(c_char_p),
|
||||
POINTER(c_float),
|
||||
POINTER(POINTER(self.CPorcupine))]
|
||||
init_func.restype = self.PicovoiceStatuses
|
||||
|
||||
self._handle = POINTER(self.CPorcupine)()
|
||||
|
||||
status = init_func(
|
||||
model_file_path.encode(),
|
||||
self._num_keywords,
|
||||
(c_char_p * self._num_keywords)(*[os.path.expanduser(x).encode() for x in keyword_file_paths]),
|
||||
(c_float * self._num_keywords)(*sensitivities),
|
||||
byref(self._handle))
|
||||
if status is not self.PicovoiceStatuses.SUCCESS:
|
||||
raise self._PICOVOICE_STATUS_TO_EXCEPTION[status]('Initialization failed')
|
||||
|
||||
self.process_func = library.pv_porcupine_multiple_keywords_process
|
||||
self.process_func.argtypes = [POINTER(self.CPorcupine), POINTER(c_short), POINTER(c_int)]
|
||||
self.process_func.restype = self.PicovoiceStatuses
|
||||
|
||||
self._delete_func = library.pv_porcupine_delete
|
||||
self._delete_func.argtypes = [POINTER(self.CPorcupine)]
|
||||
self._delete_func.restype = None
|
||||
|
||||
self._sample_rate = library.pv_sample_rate()
|
||||
self._frame_length = library.pv_porcupine_frame_length()
|
||||
|
||||
@property
|
||||
def sample_rate(self):
|
||||
"""Audio sample rate accepted by Porcupine library."""
|
||||
|
||||
return self._sample_rate
|
||||
|
||||
@property
|
||||
def frame_length(self):
|
||||
"""Number of audio samples per frame expected by C library."""
|
||||
|
||||
return self._frame_length
|
||||
|
||||
def process(self, pcm):
|
||||
"""
|
||||
Monitors incoming audio stream for given wake word(s).
|
||||
|
||||
:param pcm: An array (or array-like) of consecutive audio samples. For more information regarding required audio
|
||||
properties (i.e. sample rate, number of channels encoding, and number of samples per frame) please refer to
|
||||
'include/pv_porcupine.h'.
|
||||
:return: For a single wake-word use cse True if wake word is detected. For multiple wake-word use case it
|
||||
returns the index of detected wake-word. Indexing is 0-based and according to ordering of input keyword file
|
||||
paths. It returns -1 when no keyword is detected.
|
||||
"""
|
||||
|
||||
result = c_int()
|
||||
status = self.process_func(self._handle, (c_short * len(pcm))(*pcm), byref(result))
|
||||
if status is not self.PicovoiceStatuses.SUCCESS:
|
||||
raise self._PICOVOICE_STATUS_TO_EXCEPTION[status]('Processing failed')
|
||||
|
||||
keyword_index = result.value
|
||||
|
||||
if self._num_keywords == 1:
|
||||
return keyword_index == 0
|
||||
else:
|
||||
return keyword_index
|
||||
|
||||
def delete(self):
|
||||
"""Releases resources acquired by Porcupine's library."""
|
||||
|
||||
self._delete_func(self._handle)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,37 +0,0 @@
|
||||
A abby A B BV I
|
||||
AE adéu AE DH E W
|
||||
AO això AE Y SH AO
|
||||
B baix B A Y SH
|
||||
BV alba A L BV AE
|
||||
C guia C I AE
|
||||
CH boig B O CH
|
||||
D andy A N D I
|
||||
DH cada K A DH AE
|
||||
E cent S E N
|
||||
EA acte A K T EA
|
||||
EE aneu AE N EE W
|
||||
F cafè K AE F EE
|
||||
G èxit EE G Z I T
|
||||
GH agut AE GH U T
|
||||
I ahir AE I
|
||||
J boja B O J AE
|
||||
K amic AE M I K
|
||||
L ales A L EA S
|
||||
LY allí AE LY I
|
||||
M amor AE M O R
|
||||
N anam A N AE M
|
||||
NG banc B A NG K
|
||||
NY anys A NY S
|
||||
O avió AE BV Y O
|
||||
P capa K A P AE
|
||||
R aire A Y R EA
|
||||
RR arma A RR M AE
|
||||
S avís AE BV I S
|
||||
SH així AE Y SH I
|
||||
T alta A L T AE
|
||||
U algú AE L GH U
|
||||
UO alto A L T UO
|
||||
V vagi V A GH I
|
||||
W aqui A K W I
|
||||
Y avui AE BV U Y
|
||||
Z base B A Z EA
|
||||
@@ -1,28 +0,0 @@
|
||||
{
|
||||
"language": "ca",
|
||||
"name": "ca",
|
||||
"speech_to_text": {
|
||||
"system": "pocketsphinx",
|
||||
"dictionary_casing": "lower"
|
||||
},
|
||||
"download": {
|
||||
"conditions": {
|
||||
"speech_to_text.system": {
|
||||
"pocketsphinx": {
|
||||
"acoustic_model": "ca-es-models-v0.4.0.zip:ca-es/acoustic-model",
|
||||
"base_dictionary.txt": "ca-es-models-v0.4.0.zip:ca-es/pronounciation-dictionary.dict",
|
||||
"g2p.fst": "ca-g2p.tar.gz:g2p.fst"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"files": {
|
||||
"ca-es-models-v0.4.0.zip": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-ca/ca-es-models-v0.4.0.zip"
|
||||
},
|
||||
"ca-g2p.tar.gz": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-ca/ca-g2p.tar.gz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
[GetTime]
|
||||
quina hora es
|
||||
|
||||
[GetTemperature]
|
||||
quina és la temperatura
|
||||
|
||||
[GetGarageState]
|
||||
la porta del garatge està oberta
|
||||
està la porta del garatge tancada
|
||||
|
||||
[ChangeLightState]
|
||||
light_name = (làmpada de la sala | llum del garatge) {name}
|
||||
light_state = (encén:on | apagueu:on | engegueu:off) {state}
|
||||
|
||||
<light_state> [la] <light_state>
|
||||
@@ -1,701 +0,0 @@
|
||||
a
|
||||
abans
|
||||
abans-d'ahir
|
||||
abintestat
|
||||
ací
|
||||
adesiara
|
||||
adés
|
||||
adéu
|
||||
adàgio
|
||||
ah
|
||||
ahir
|
||||
ai
|
||||
aitambé
|
||||
aitampoc
|
||||
aitan
|
||||
aitant
|
||||
aitantost
|
||||
aixà
|
||||
això
|
||||
així
|
||||
aleshores
|
||||
algun
|
||||
alguna
|
||||
algunes
|
||||
alguns
|
||||
algú
|
||||
alhora
|
||||
allà
|
||||
allèn
|
||||
allò
|
||||
allí
|
||||
almenys
|
||||
alto
|
||||
altra
|
||||
altre
|
||||
altres
|
||||
altresí
|
||||
altri
|
||||
alça
|
||||
al·legro
|
||||
amargament
|
||||
amb
|
||||
ambdues
|
||||
ambdós
|
||||
amunt
|
||||
amén
|
||||
anc
|
||||
andante
|
||||
andantino
|
||||
anit
|
||||
ans
|
||||
antany
|
||||
apa
|
||||
aprés
|
||||
aqueix
|
||||
aqueixa
|
||||
aqueixes
|
||||
aqueixos
|
||||
aqueixs
|
||||
aquell
|
||||
aquella
|
||||
aquelles
|
||||
aquells
|
||||
aquest
|
||||
aquesta
|
||||
aquestes
|
||||
aquests
|
||||
aquèn
|
||||
aquí
|
||||
ara
|
||||
arran
|
||||
arrera
|
||||
arrere
|
||||
arreu
|
||||
arri
|
||||
arruix
|
||||
atxim
|
||||
au
|
||||
avall
|
||||
avant
|
||||
aviat
|
||||
avui
|
||||
açò
|
||||
bah
|
||||
baix
|
||||
baldament
|
||||
ballmanetes
|
||||
banzim-banzam
|
||||
bastant
|
||||
bastants
|
||||
ben
|
||||
bis
|
||||
bitllo-bitllo
|
||||
bo
|
||||
bé
|
||||
ca
|
||||
cada
|
||||
cal
|
||||
cap
|
||||
car
|
||||
caram
|
||||
catorze
|
||||
cent
|
||||
centes
|
||||
cents
|
||||
cerca
|
||||
cert
|
||||
certa
|
||||
certes
|
||||
certs
|
||||
cinc
|
||||
cinquanta
|
||||
cinquena
|
||||
cinquenes
|
||||
cinquens
|
||||
cinquè
|
||||
com
|
||||
comsevulla
|
||||
contra
|
||||
cordons
|
||||
corrents
|
||||
cric-crac
|
||||
d
|
||||
daixonses
|
||||
daixò
|
||||
dallonses
|
||||
dallò
|
||||
dalt
|
||||
daltabaix
|
||||
damunt
|
||||
darrera
|
||||
darrere
|
||||
davall
|
||||
davant
|
||||
de
|
||||
debades
|
||||
dedins
|
||||
defora
|
||||
dejorn
|
||||
dejús
|
||||
dellà
|
||||
dementre
|
||||
dempeus
|
||||
demés
|
||||
demà
|
||||
des
|
||||
desena
|
||||
desenes
|
||||
desens
|
||||
després
|
||||
dessobre
|
||||
dessota
|
||||
dessús
|
||||
desè
|
||||
deu
|
||||
devers
|
||||
devora
|
||||
deçà
|
||||
diferents
|
||||
dinou
|
||||
dins
|
||||
dintre
|
||||
disset
|
||||
divers
|
||||
diversa
|
||||
diverses
|
||||
diversos
|
||||
divuit
|
||||
doncs
|
||||
dos
|
||||
dotze
|
||||
dues
|
||||
durant
|
||||
ecs
|
||||
eh
|
||||
el
|
||||
ela
|
||||
elis
|
||||
ell
|
||||
ella
|
||||
elles
|
||||
ells
|
||||
els
|
||||
em
|
||||
emperò
|
||||
en
|
||||
enans
|
||||
enant
|
||||
encara
|
||||
encontinent
|
||||
endalt
|
||||
endarrera
|
||||
endarrere
|
||||
endavant
|
||||
endebades
|
||||
endemig
|
||||
endemés
|
||||
endemà
|
||||
endins
|
||||
endintre
|
||||
enfora
|
||||
engir
|
||||
enguany
|
||||
enguanyasses
|
||||
enjús
|
||||
enlaire
|
||||
enlloc
|
||||
enllà
|
||||
enrera
|
||||
enrere
|
||||
ens
|
||||
ensems
|
||||
ensota
|
||||
ensús
|
||||
entorn
|
||||
entre
|
||||
entremig
|
||||
entretant
|
||||
entrò
|
||||
envers
|
||||
envides
|
||||
environs
|
||||
enviró
|
||||
ençà
|
||||
ep
|
||||
ep
|
||||
era
|
||||
eren
|
||||
eres
|
||||
ergo
|
||||
es
|
||||
escar
|
||||
essent
|
||||
esser
|
||||
est
|
||||
esta
|
||||
estada
|
||||
estades
|
||||
estan
|
||||
estant
|
||||
estar
|
||||
estaran
|
||||
estarem
|
||||
estareu
|
||||
estaria
|
||||
estarien
|
||||
estaries
|
||||
estaré
|
||||
estarà
|
||||
estaràs
|
||||
estaríem
|
||||
estaríeu
|
||||
estat
|
||||
estats
|
||||
estava
|
||||
estaven
|
||||
estaves
|
||||
estem
|
||||
estes
|
||||
esteu
|
||||
estic
|
||||
estiguem
|
||||
estigueren
|
||||
estigueres
|
||||
estigues
|
||||
estiguessis
|
||||
estigueu
|
||||
estigui
|
||||
estiguin
|
||||
estiguis
|
||||
estigué
|
||||
estiguérem
|
||||
estiguéreu
|
||||
estigués
|
||||
estiguí
|
||||
estos
|
||||
està
|
||||
estàs
|
||||
estàvem
|
||||
estàveu
|
||||
et
|
||||
etc
|
||||
etcètera
|
||||
ets
|
||||
excepte
|
||||
fins
|
||||
fora
|
||||
foren
|
||||
fores
|
||||
força
|
||||
fos
|
||||
fossin
|
||||
fossis
|
||||
fou
|
||||
fra
|
||||
fui
|
||||
fóra
|
||||
fórem
|
||||
fóreu
|
||||
fóreu
|
||||
fóssim
|
||||
fóssiu
|
||||
gaire
|
||||
gairebé
|
||||
gaires
|
||||
gens
|
||||
girientorn
|
||||
gratis
|
||||
ha
|
||||
hagi
|
||||
hagin
|
||||
hagis
|
||||
haguda
|
||||
hagudes
|
||||
hagueren
|
||||
hagueres
|
||||
haguessin
|
||||
haguessis
|
||||
hagut
|
||||
haguts
|
||||
hagué
|
||||
haguérem
|
||||
haguéreu
|
||||
hagués
|
||||
haguéssim
|
||||
haguéssiu
|
||||
haguí
|
||||
hala
|
||||
han
|
||||
has
|
||||
hauran
|
||||
haurem
|
||||
haureu
|
||||
hauria
|
||||
haurien
|
||||
hauries
|
||||
hauré
|
||||
haurà
|
||||
hauràs
|
||||
hauríem
|
||||
hauríeu
|
||||
havem
|
||||
havent
|
||||
haver
|
||||
haveu
|
||||
havia
|
||||
havien
|
||||
havies
|
||||
havíem
|
||||
havíeu
|
||||
he
|
||||
hem
|
||||
heu
|
||||
hi
|
||||
ho
|
||||
hom
|
||||
hui
|
||||
hàgim
|
||||
hàgiu
|
||||
i
|
||||
igual
|
||||
iguals
|
||||
inclusive
|
||||
ja
|
||||
jamai
|
||||
jo
|
||||
l
|
||||
la
|
||||
leri-leri
|
||||
les
|
||||
li
|
||||
lla
|
||||
llavors
|
||||
llevat
|
||||
lluny
|
||||
llur
|
||||
llurs
|
||||
lo
|
||||
los
|
||||
ls
|
||||
m
|
||||
ma
|
||||
mai
|
||||
mal
|
||||
malament
|
||||
malgrat
|
||||
manco
|
||||
mant
|
||||
manta
|
||||
mantes
|
||||
mantinent
|
||||
mants
|
||||
massa
|
||||
mateix
|
||||
mateixa
|
||||
mateixes
|
||||
mateixos
|
||||
me
|
||||
mentre
|
||||
mentrestant
|
||||
menys
|
||||
mes
|
||||
meu
|
||||
meua
|
||||
meues
|
||||
meus
|
||||
meva
|
||||
meves
|
||||
mi
|
||||
mig
|
||||
mil
|
||||
mitges
|
||||
mitja
|
||||
mitjançant
|
||||
mitjos
|
||||
moixoni
|
||||
molt
|
||||
molta
|
||||
moltes
|
||||
molts
|
||||
mon
|
||||
mos
|
||||
més
|
||||
n
|
||||
na
|
||||
ne
|
||||
ni
|
||||
ningú
|
||||
no
|
||||
nogensmenys
|
||||
només
|
||||
noranta
|
||||
nos
|
||||
nosaltres
|
||||
nostra
|
||||
nostre
|
||||
nostres
|
||||
nou
|
||||
novena
|
||||
novenes
|
||||
novens
|
||||
novè
|
||||
ns
|
||||
nòs
|
||||
nós
|
||||
o
|
||||
oh
|
||||
oi
|
||||
oidà
|
||||
on
|
||||
onsevulga
|
||||
onsevulla
|
||||
onze
|
||||
pas
|
||||
pengim-penjam
|
||||
per
|
||||
perquè
|
||||
pertot
|
||||
però
|
||||
piano
|
||||
pla
|
||||
poc
|
||||
poca
|
||||
pocs
|
||||
poques
|
||||
potser
|
||||
prest
|
||||
primer
|
||||
primera
|
||||
primeres
|
||||
primers
|
||||
pro
|
||||
prompte
|
||||
prop
|
||||
prou
|
||||
puix
|
||||
pus
|
||||
pàssim
|
||||
qual
|
||||
quals
|
||||
qualsevol
|
||||
qualsevulla
|
||||
qualssevol
|
||||
qualssevulla
|
||||
quan
|
||||
quant
|
||||
quanta
|
||||
quantes
|
||||
quants
|
||||
quaranta
|
||||
quart
|
||||
quarta
|
||||
quartes
|
||||
quarts
|
||||
quasi
|
||||
quatre
|
||||
que
|
||||
quelcom
|
||||
qui
|
||||
quin
|
||||
quina
|
||||
quines
|
||||
quins
|
||||
quinze
|
||||
quisvulla
|
||||
què
|
||||
ran
|
||||
re
|
||||
rebé
|
||||
renoi
|
||||
rera
|
||||
rere
|
||||
res
|
||||
retruc
|
||||
s
|
||||
sa
|
||||
salvament
|
||||
salvant
|
||||
salvat
|
||||
se
|
||||
segon
|
||||
segona
|
||||
segones
|
||||
segons
|
||||
seguida
|
||||
seixanta
|
||||
sempre
|
||||
sengles
|
||||
sens
|
||||
sense
|
||||
ser
|
||||
seran
|
||||
serem
|
||||
sereu
|
||||
seria
|
||||
serien
|
||||
series
|
||||
seré
|
||||
serà
|
||||
seràs
|
||||
seríem
|
||||
seríeu
|
||||
ses
|
||||
set
|
||||
setanta
|
||||
setena
|
||||
setenes
|
||||
setens
|
||||
setze
|
||||
setè
|
||||
seu
|
||||
seua
|
||||
seues
|
||||
seus
|
||||
seva
|
||||
seves
|
||||
si
|
||||
sia
|
||||
siau
|
||||
sic
|
||||
siguem
|
||||
sigues
|
||||
sigueu
|
||||
sigui
|
||||
siguin
|
||||
siguis
|
||||
sinó
|
||||
sis
|
||||
sisena
|
||||
sisenes
|
||||
sisens
|
||||
sisè
|
||||
sobre
|
||||
sobretot
|
||||
sol
|
||||
sola
|
||||
solament
|
||||
soles
|
||||
sols
|
||||
som
|
||||
son
|
||||
sos
|
||||
sota
|
||||
sots
|
||||
sou
|
||||
sovint
|
||||
suara
|
||||
sí
|
||||
sóc
|
||||
són
|
||||
t
|
||||
ta
|
||||
tal
|
||||
tals
|
||||
també
|
||||
tampoc
|
||||
tan
|
||||
tanmateix
|
||||
tant
|
||||
tanta
|
||||
tantes
|
||||
tantost
|
||||
tants
|
||||
te
|
||||
tercer
|
||||
tercera
|
||||
terceres
|
||||
tercers
|
||||
tes
|
||||
teu
|
||||
teua
|
||||
teues
|
||||
teus
|
||||
teva
|
||||
teves
|
||||
ton
|
||||
tos
|
||||
tost
|
||||
tostemps
|
||||
tot
|
||||
tota
|
||||
total
|
||||
totes
|
||||
tothom
|
||||
tothora
|
||||
tots
|
||||
trenta
|
||||
tres
|
||||
tret
|
||||
tretze
|
||||
tu
|
||||
tururut
|
||||
u
|
||||
uf
|
||||
ui
|
||||
uix
|
||||
ultra
|
||||
un
|
||||
una
|
||||
unes
|
||||
uns
|
||||
up
|
||||
upa
|
||||
us
|
||||
va
|
||||
vagi
|
||||
vagin
|
||||
vagis
|
||||
vaig
|
||||
vair
|
||||
vam
|
||||
van
|
||||
vares
|
||||
vas
|
||||
vau
|
||||
vem
|
||||
verbigràcia
|
||||
vers
|
||||
vet
|
||||
veu
|
||||
vint
|
||||
vora
|
||||
vos
|
||||
vosaltres
|
||||
vostra
|
||||
vostre
|
||||
vostres
|
||||
vostè
|
||||
vostès
|
||||
vuit
|
||||
vuitanta
|
||||
vuitena
|
||||
vuitenes
|
||||
vuitens
|
||||
vuitè
|
||||
vés
|
||||
vàreig
|
||||
vàrem
|
||||
vàreu
|
||||
vós
|
||||
xano-xano
|
||||
xau-xau
|
||||
xec
|
||||
érem
|
||||
éreu
|
||||
és
|
||||
ésser
|
||||
àdhuc
|
||||
àlies
|
||||
ça
|
||||
ço
|
||||
òlim
|
||||
ídem
|
||||
últim
|
||||
última
|
||||
últimes
|
||||
últims
|
||||
únic
|
||||
única
|
||||
únics
|
||||
úniques
|
||||
Executable
+67
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Directory required as first argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DIR="$1"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Acoustic Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
acoustic_output="${DIR}/acoustic_model"
|
||||
|
||||
if [[ ! -d "${acoustic_output}" ]]; then
|
||||
echo "Missing acoustic model"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# G2P
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
g2p_output="${DIR}/g2p.fst"
|
||||
|
||||
if [[ ! -s "${g2p_output}" ]]; then
|
||||
echo "Missing g2p model"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Dictionary
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
dict_output="${DIR}/base_dictionary.txt"
|
||||
|
||||
if [[ ! -s "${dict_output}" ]]; then
|
||||
echo "Missing base dictionary"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Language Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
lm_output="${DIR}/base_language_model.txt"
|
||||
|
||||
if [[ ! -s "${lm_output}" ]]; then
|
||||
echo "Missing base language model"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Flair Embeddings
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
flair_dir="${DIR}/flair/cache/embeddings"
|
||||
flair_files=("lm-mix-german-forward-v0.2rc.pt" "lm-mix-german-backward-v0.2rc.pt")
|
||||
for file_name in "${flair_files[@]}"; do
|
||||
file_output="${flair_dir}/${file_name}"
|
||||
if [[ ! -s "${file_output}" ]]; then
|
||||
echo "Missing flair embedding (${file_name})"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
Executable
+119
@@ -0,0 +1,119 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Directory required as first argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DIR="$1"
|
||||
download_dir="${DIR}/download"
|
||||
|
||||
if [[ "$2" = "--delete" ]]; then
|
||||
rm -rf "${download_dir}"
|
||||
fi
|
||||
|
||||
mkdir -p "${download_dir}"
|
||||
|
||||
echo "Downloading German (de) profile (sphinx)"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Acoustic Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
acoustic_url='https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-de/cmusphinx-de-voxforge-5.2.tar.gz'
|
||||
acoustic_file="${download_dir}/cmusphinx-de-voxforge-5.2.tar.gz"
|
||||
acoustic_output="${DIR}/acoustic_model"
|
||||
|
||||
if [[ ! -s "${acoustic_file}" ]]; then
|
||||
echo "Downloading acoustic model (${acoustic_url})"
|
||||
curl -sSfL -o "${acoustic_file}" "${acoustic_url}"
|
||||
fi
|
||||
|
||||
echo "Extracting acoustic model (${acoustic_file})"
|
||||
rm -rf "${acoustic_output}"
|
||||
tar -C "${DIR}" -xf "${acoustic_file}" "cmusphinx-cont-voxforge-de-r20171217/model_parameters/voxforge.cd_cont_6000/" && mv "${DIR}/cmusphinx-cont-voxforge-de-r20171217/model_parameters/voxforge.cd_cont_6000" "${acoustic_output}" && rm -rf "${DIR}/cmusphinx-cont-voxforge-de-r20171217"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# G2P
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
g2p_url='https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-de/de-g2p.tar.gz'
|
||||
g2p_file="${download_dir}/de-g2p.tar.gz"
|
||||
g2p_output="${DIR}/g2p.fst"
|
||||
|
||||
if [[ ! -s "${g2p_file}" ]]; then
|
||||
echo "Downloading g2p model (${g2p_url})"
|
||||
curl -sSfL -o "${g2p_file}" "${g2p_url}"
|
||||
fi
|
||||
|
||||
echo "Extracting g2p model (${g2p_file})"
|
||||
tar --to-stdout -xzf "${g2p_file}" 'g2p.fst' > "${g2p_output}"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Dictionary
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
dict_output="${DIR}/base_dictionary.txt"
|
||||
echo "Extracting dictionary (${acoustic_file})"
|
||||
tar --to-stdout -xf "${acoustic_file}" "cmusphinx-cont-voxforge-de-r20171217/etc/voxforge.dic" > "${dict_output}"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Language Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
lm_url='https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-de/cmusphinx-voxforge-de.lm.gz'
|
||||
lm_file="${download_dir}/cmusphinx-voxforge-de.lm.gz"
|
||||
lm_output="${DIR}/base_language_model.txt"
|
||||
|
||||
if [[ ! -s "${lm_file}" ]]; then
|
||||
echo "Downloading language model (${lm_url})"
|
||||
curl -sSfL -o "${lm_file}" "${lm_url}"
|
||||
fi
|
||||
|
||||
echo "Extracting language model (${lm_file})"
|
||||
zcat "${lm_file}" > "${lm_output}"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Snowboy
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
snowboy_models=("snowboy.umdl" "computer.umdl")
|
||||
for model_name in "${snowboy_models[@]}"; do
|
||||
model_output="${DIR}/${model_name}"
|
||||
if [[ ! -s "${model_output}" ]]; then
|
||||
model_url="https://github.com/Kitt-AI/snowboy/raw/master/resources/models/${model_name}"
|
||||
echo "Downloading ${model_output} (${model_url})"
|
||||
curl -sSfL -o "${model_output}" "${model_url}"
|
||||
fi
|
||||
done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Mycroft Precise
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
precise_files=("hey-mycroft-2.pb" "hey-mycroft-2.pb.params")
|
||||
for file_name in "${precise_files[@]}"; do
|
||||
file_output="${DIR}/${file_name}"
|
||||
if [[ ! -s "${file_output}" ]]; then
|
||||
file_url="https://github.com/MycroftAI/precise-data/raw/models/${file_name}"
|
||||
echo "Downloading ${file_output} (${file_url})"
|
||||
curl -sSfL -o "${file_output}" "${file_url}"
|
||||
fi
|
||||
done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Flair Embeddings
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
flair_dir="${DIR}/flair/cache/embeddings"
|
||||
mkdir -p "${flair_dir}"
|
||||
flair_files=("lm-mix-german-forward-v0.2rc.pt" "lm-mix-german-backward-v0.2rc.pt")
|
||||
for file_name in "${flair_files[@]}"; do
|
||||
file_output="${flair_dir}/${file_name}"
|
||||
if [[ ! -s "${file_output}" ]]; then
|
||||
file_url="https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-de/${file_name}"
|
||||
echo "Downloading ${file_output} (${file_url})"
|
||||
curl -sSfL -o "${file_output}" "${file_url}"
|
||||
fi
|
||||
done
|
||||
@@ -1,2 +0,0 @@
|
||||
garagenlicht g a R 'a: Z @ ? 'a l 'I C t
|
||||
wohnzimmerlampe v 'o: n ts I m 6 l 'a m p @
|
||||
@@ -1,101 +0,0 @@
|
||||
'2 3:
|
||||
'2: 3:
|
||||
'3 3:
|
||||
'3: ?
|
||||
'6 3:
|
||||
'9 3:
|
||||
'@ k
|
||||
'A 0
|
||||
'A: ?
|
||||
'E E
|
||||
'E: E
|
||||
'I I
|
||||
'O 0
|
||||
'O: ?
|
||||
'OI E
|
||||
'OY j
|
||||
'U V
|
||||
'V V
|
||||
'Y u:
|
||||
'a a
|
||||
'a: a
|
||||
'aI eI
|
||||
'aU O:
|
||||
'e d
|
||||
'e: E
|
||||
'i i:
|
||||
'i: i:
|
||||
'o aa
|
||||
'o: oU
|
||||
'u l
|
||||
'u: V
|
||||
'y ?
|
||||
'y: u:
|
||||
'{ a
|
||||
2 ?
|
||||
2: r
|
||||
3 3
|
||||
3: ?
|
||||
6 3
|
||||
9 ?
|
||||
: ?
|
||||
? 3:
|
||||
A ?
|
||||
A: ?
|
||||
C tS
|
||||
D D
|
||||
E 3:
|
||||
E: h
|
||||
H ?
|
||||
I I
|
||||
N N
|
||||
O 0
|
||||
O: ?
|
||||
OI ?
|
||||
OY U@
|
||||
R r
|
||||
S S
|
||||
SIL ?
|
||||
T T
|
||||
U V
|
||||
V ?
|
||||
Y u:
|
||||
Z ?
|
||||
a a
|
||||
a: @
|
||||
aI aI
|
||||
aU f
|
||||
b b
|
||||
d d
|
||||
dZ dZ
|
||||
e E
|
||||
e: h
|
||||
f f
|
||||
g dZ
|
||||
h h
|
||||
i i
|
||||
i: i
|
||||
j dZ
|
||||
k k
|
||||
l l
|
||||
m m
|
||||
n n
|
||||
nC ?
|
||||
o 0
|
||||
o: oU
|
||||
p p
|
||||
pf f
|
||||
r r
|
||||
s s
|
||||
t t
|
||||
tS tS
|
||||
ts z
|
||||
u l
|
||||
u: j
|
||||
v w
|
||||
w w
|
||||
x tS
|
||||
y ?
|
||||
y: b
|
||||
z s
|
||||
{ ?
|
||||
@@ -1,82 +0,0 @@
|
||||
'2 götter g '2 t 6
|
||||
'2: blöd b l '2: t
|
||||
'3 wir w '3
|
||||
'6 konzern k O n ts '6 n
|
||||
'9 hölle h '9 l
|
||||
'@ tony t '@ U n i
|
||||
'A high h 'A I
|
||||
'E berg b 'E 6 k
|
||||
'E: fair f 'E: 6
|
||||
'I bild b 'I l t
|
||||
'O bord b 'O 6 t
|
||||
'OI fräulein f R 'OI l aI n
|
||||
'OY euch ? 'OY C
|
||||
'U dumm d 'U m
|
||||
'V love l 'V v
|
||||
'Y fünf f 'Y n f
|
||||
'a akte ? 'a k t
|
||||
'a: bahn b 'a: n
|
||||
'aI beim b 'aI m
|
||||
'aU blau b l 'aU
|
||||
'e erstmals ? 'e 6 s t m a: l s
|
||||
'e: dreh d R 'e:
|
||||
'i deal d 'i l
|
||||
'i: bier b 'i: 6
|
||||
'o chance S 'o s
|
||||
'o: bloß b l 'o: s
|
||||
'u louis l 'u i z
|
||||
'u: blut b l 'u: t
|
||||
'y: früh f R 'y:
|
||||
'{ adam '{ d m
|
||||
2: aufhören ? 'aU f h 2: R n
|
||||
3 roger r 'A dZ 3
|
||||
6 arme ? 'a 6 m
|
||||
? aber ? 'a b 6
|
||||
C dich d 'I C
|
||||
D the D '@
|
||||
E eddie ? E d 'i:
|
||||
E: erzähle ? 'E 6 ts E: l
|
||||
I dave d 'e I f
|
||||
N bank b 'a N k
|
||||
O okay ? O k 'e I
|
||||
OY europa ? OY R 'o: p a:
|
||||
R brot b R 'o: t
|
||||
S chef S 'E f
|
||||
T smith s m 'I T
|
||||
U code k '@ U d
|
||||
Y system z Y s t 'e: m
|
||||
a amen ? a m 'E n
|
||||
a: anna ? 'a n a:
|
||||
aI anteil ? 'a n t aI l
|
||||
aU august ? aU g 'U s t
|
||||
b baby b 'e: b i
|
||||
d dach d 'a x
|
||||
dZ jake dZ 'E I k
|
||||
e egal ? e g 'a: l
|
||||
e: daher d 'a: h e: 6
|
||||
f aufs ? 'aU f s
|
||||
g auge ? 'aU g
|
||||
h haar h 'a: 6
|
||||
i joey dZ '@ U i
|
||||
i: city s 'I t i:
|
||||
j jahr j 'a: 6
|
||||
k burg b 'U 6 k
|
||||
l alle ? 'a l
|
||||
m baum b 'aU m
|
||||
n alan '{ l n
|
||||
o kino k 'i: n o
|
||||
o: auto ? 'aU t o:
|
||||
p club k l 'U p
|
||||
pf kopf k 'O pf
|
||||
r mary m 'E r i:
|
||||
s alex ? a l 'E k s
|
||||
t acht ? 'a x t
|
||||
tS jack tS '{ k
|
||||
ts arzt ? 'a 6 ts t
|
||||
u yahoo j 'A h u
|
||||
u: anruf ? 'a n R u: f
|
||||
v etwa ? 'E t v a
|
||||
w william w 'I l j m
|
||||
x auch ? 'aU x
|
||||
y: büro b y: R 'o:
|
||||
z also ? 'a l z o:
|
||||
+16
-87
@@ -1,94 +1,23 @@
|
||||
{
|
||||
"language": "de",
|
||||
"name": "de",
|
||||
"speech_to_text": {
|
||||
"system": "pocketsphinx",
|
||||
"dictionary_casing": "lower",
|
||||
"kaldi": {
|
||||
"base_dictionary": "kaldi/base_dictionary.txt",
|
||||
"base_language_model": "kaldi/base_language_model.txt",
|
||||
"compatible": true,
|
||||
"custom_words": "kaldi/custom_words.txt",
|
||||
"dictionary": "kaldi/dictionary.txt",
|
||||
"graph": "graph",
|
||||
"language_model": "kaldi/language_model.txt",
|
||||
"model_dir": "kaldi/model",
|
||||
"unknown_words": "kaldi/unknown_words.txt",
|
||||
"mix_fst": "kaldi/mixed.fst",
|
||||
"g2p_model": "kaldi/g2p.fst",
|
||||
"phoneme_examples": "kaldi/phoneme_examples.txt",
|
||||
"phoneme_map": "kaldi/espeak_phonemes.txt"
|
||||
}
|
||||
},
|
||||
"intent": {
|
||||
"flair": {
|
||||
"embeddings": [
|
||||
"lm-mix-german-forward-v0.2rc.pt",
|
||||
"lm-mix-german-backward-v0.2rc.pt"
|
||||
]
|
||||
}
|
||||
},
|
||||
"text_to_speech": {
|
||||
"wavenet": {
|
||||
"language_code": "de-DE"
|
||||
"language": "de",
|
||||
"name": "de",
|
||||
"wake": {
|
||||
"system": "snowboy"
|
||||
},
|
||||
"marytts": {
|
||||
"locale": "de-DE"
|
||||
}
|
||||
},
|
||||
"download": {
|
||||
"conditions": {
|
||||
"speech_to_text.system": {
|
||||
"pocketsphinx": {
|
||||
"acoustic_model": "cmusphinx-de-voxforge-5.2.tar.gz:cmusphinx-cont-voxforge-de-r20171217/model_parameters/voxforge.cd_cont_6000",
|
||||
"base_dictionary.txt": "cmusphinx-de-voxforge-5.2.tar.gz:cmusphinx-cont-voxforge-de-r20171217/etc/voxforge.dic",
|
||||
"g2p.fst": "de-g2p.tar.gz:g2p.fst"
|
||||
},
|
||||
"kaldi": {
|
||||
"kaldi": "de_kaldi-zamia.tar.gz:kaldi"
|
||||
}
|
||||
},
|
||||
"speech_to_text.kaldi.open_transcription": {
|
||||
"True": {
|
||||
"kaldi/model/base_graph": "de_kaldi-zamia-base_graph.tar.gz:base_graph"
|
||||
}
|
||||
},
|
||||
"speech_to_text.pocketsphinx.mix_weight": {
|
||||
">0": {
|
||||
"base_language_model.txt": "cmusphinx-voxforge-de.lm.gz:cmusphinx-voxforge-de.lm"
|
||||
}
|
||||
},
|
||||
"intent.system": {
|
||||
"intent": {
|
||||
"flair": {
|
||||
"flair/cache/embeddings/lm-mix-german-forward-v0.2rc.pt": "lm-mix-german-forward-v0.2rc.pt",
|
||||
"flair/cache/embeddings/lm-mix-german-backward-v0.2rc.pt": "lm-mix-german-backward-v0.2rc.pt"
|
||||
"embeddings": [
|
||||
"lm-mix-german-forward-v0.2rc.pt",
|
||||
"lm-mix-german-backward-v0.2rc.pt"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"cmusphinx-de-voxforge-5.2.tar.gz": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-de/cmusphinx-de-voxforge-5.2.tar.gz"
|
||||
},
|
||||
"cmusphinx-voxforge-de.lm.gz": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-de/cmusphinx-voxforge-de.lm.gz"
|
||||
},
|
||||
"de-g2p.tar.gz": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-de/de-g2p.tar.gz"
|
||||
},
|
||||
"lm-mix-german-forward-v0.2rc.pt": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-de/lm-mix-german-forward-v0.2rc.pt",
|
||||
"cache": false
|
||||
},
|
||||
"lm-mix-german-backward-v0.2rc.pt": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-de/lm-mix-german-backward-v0.2rc.pt",
|
||||
"cache": false
|
||||
},
|
||||
"de_kaldi-zamia.tar.gz": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-de/de_kaldi-zamia.tar.gz"
|
||||
},
|
||||
"de_kaldi-zamia-base_graph.tar.gz": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-de/de_kaldi-zamia-base_graph.tar.gz"
|
||||
}
|
||||
"text_to_speech": {
|
||||
"wavenet": {
|
||||
"language_code": "de-DE"
|
||||
},
|
||||
"marytts": {
|
||||
"locale": "de-DE"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,231 +0,0 @@
|
||||
aber
|
||||
alle
|
||||
allem
|
||||
allen
|
||||
aller
|
||||
alles
|
||||
als
|
||||
also
|
||||
am
|
||||
an
|
||||
ander
|
||||
andere
|
||||
anderem
|
||||
anderen
|
||||
anderer
|
||||
anderes
|
||||
anderm
|
||||
andern
|
||||
anderr
|
||||
anders
|
||||
auch
|
||||
auf
|
||||
aus
|
||||
bei
|
||||
bin
|
||||
bis
|
||||
bist
|
||||
da
|
||||
damit
|
||||
dann
|
||||
der
|
||||
den
|
||||
des
|
||||
dem
|
||||
die
|
||||
das
|
||||
daß
|
||||
derselbe
|
||||
derselben
|
||||
denselben
|
||||
desselben
|
||||
demselben
|
||||
dieselbe
|
||||
dieselben
|
||||
dasselbe
|
||||
dazu
|
||||
dein
|
||||
deine
|
||||
deinem
|
||||
deinen
|
||||
deiner
|
||||
deines
|
||||
denn
|
||||
derer
|
||||
dessen
|
||||
dich
|
||||
dir
|
||||
du
|
||||
dies
|
||||
diese
|
||||
diesem
|
||||
diesen
|
||||
dieser
|
||||
dieses
|
||||
doch
|
||||
dort
|
||||
durch
|
||||
ein
|
||||
eine
|
||||
einem
|
||||
einen
|
||||
einer
|
||||
eines
|
||||
einig
|
||||
einige
|
||||
einigem
|
||||
einigen
|
||||
einiger
|
||||
einiges
|
||||
einmal
|
||||
er
|
||||
ihn
|
||||
ihm
|
||||
es
|
||||
etwas
|
||||
euer
|
||||
eure
|
||||
eurem
|
||||
euren
|
||||
eurer
|
||||
eures
|
||||
für
|
||||
gegen
|
||||
gewesen
|
||||
hab
|
||||
habe
|
||||
haben
|
||||
hat
|
||||
hatte
|
||||
hatten
|
||||
hier
|
||||
hin
|
||||
hinter
|
||||
ich
|
||||
mich
|
||||
mir
|
||||
ihr
|
||||
ihre
|
||||
ihrem
|
||||
ihren
|
||||
ihrer
|
||||
ihres
|
||||
euch
|
||||
im
|
||||
in
|
||||
indem
|
||||
ins
|
||||
ist
|
||||
jede
|
||||
jedem
|
||||
jeden
|
||||
jeder
|
||||
jedes
|
||||
jene
|
||||
jenem
|
||||
jenen
|
||||
jener
|
||||
jenes
|
||||
jetzt
|
||||
kann
|
||||
kein
|
||||
keine
|
||||
keinem
|
||||
keinen
|
||||
keiner
|
||||
keines
|
||||
können
|
||||
könnte
|
||||
machen
|
||||
man
|
||||
manche
|
||||
manchem
|
||||
manchen
|
||||
mancher
|
||||
manches
|
||||
mein
|
||||
meine
|
||||
meinem
|
||||
meinen
|
||||
meiner
|
||||
meines
|
||||
mit
|
||||
muss
|
||||
musste
|
||||
nach
|
||||
nicht
|
||||
nichts
|
||||
noch
|
||||
nun
|
||||
nur
|
||||
ob
|
||||
oder
|
||||
ohne
|
||||
sehr
|
||||
sein
|
||||
seine
|
||||
seinem
|
||||
seinen
|
||||
seiner
|
||||
seines
|
||||
selbst
|
||||
sich
|
||||
sie
|
||||
ihnen
|
||||
sind
|
||||
so
|
||||
solche
|
||||
solchem
|
||||
solchen
|
||||
solcher
|
||||
solches
|
||||
soll
|
||||
sollte
|
||||
sondern
|
||||
sonst
|
||||
über
|
||||
um
|
||||
und
|
||||
uns
|
||||
unsere
|
||||
unserem
|
||||
unseren
|
||||
unser
|
||||
unseres
|
||||
unter
|
||||
viel
|
||||
vom
|
||||
von
|
||||
vor
|
||||
während
|
||||
war
|
||||
waren
|
||||
warst
|
||||
was
|
||||
weg
|
||||
weil
|
||||
weiter
|
||||
welche
|
||||
welchem
|
||||
welchen
|
||||
welcher
|
||||
welches
|
||||
wenn
|
||||
werde
|
||||
werden
|
||||
wie
|
||||
wieder
|
||||
will
|
||||
wir
|
||||
wird
|
||||
wirst
|
||||
wo
|
||||
wollen
|
||||
wollte
|
||||
würde
|
||||
würden
|
||||
zu
|
||||
zum
|
||||
zur
|
||||
zwar
|
||||
zwischen
|
||||
|
||||
+228
-312
@@ -1,330 +1,246 @@
|
||||
{
|
||||
"command": {
|
||||
"command": {
|
||||
"arguments": [],
|
||||
"program": ""
|
||||
"command": {
|
||||
"arguments": [],
|
||||
"program": ""
|
||||
},
|
||||
"hermes": {
|
||||
"timeout_sec": 30
|
||||
},
|
||||
"oneshot": {
|
||||
"timeout_sec": 30
|
||||
},
|
||||
"system": "webrtcvad",
|
||||
"webrtcvad": {
|
||||
"chunk_size": 960,
|
||||
"min_sec": 2,
|
||||
"sample_rate": 16000,
|
||||
"silence_sec": 0.5,
|
||||
"speech_buffers": 5,
|
||||
"throwaway_buffers": 10,
|
||||
"timeout_sec": 30,
|
||||
"vad_mode": 0
|
||||
}
|
||||
},
|
||||
"hermes": {
|
||||
"timeout_sec": 30
|
||||
"handle": {
|
||||
"command": {
|
||||
"arguments": [],
|
||||
"program": ""
|
||||
},
|
||||
"forward_to_hass": true,
|
||||
"system": "hass"
|
||||
},
|
||||
"oneshot": {
|
||||
"timeout_sec": 30
|
||||
},
|
||||
"system": "webrtcvad",
|
||||
"webrtcvad": {
|
||||
"chunk_size": 960,
|
||||
"min_sec": 2,
|
||||
"sample_rate": 16000,
|
||||
"silence_sec": 0.5,
|
||||
"speech_buffers": 5,
|
||||
"throwaway_buffers": 10,
|
||||
"timeout_sec": 30,
|
||||
"vad_mode": 0
|
||||
}
|
||||
},
|
||||
"handle": {
|
||||
"command": {
|
||||
"arguments": [],
|
||||
"program": ""
|
||||
},
|
||||
"forward_to_hass": false,
|
||||
"system": "dummy"
|
||||
},
|
||||
"home_assistant": {
|
||||
"access_token": "",
|
||||
"api_password": "",
|
||||
"event_type_format": "rhasspy_{0}",
|
||||
"pem_file": "",
|
||||
"url": "http://hassio/homeassistant/"
|
||||
},
|
||||
"intent": {
|
||||
"adapt": {
|
||||
"stop_words": "stop_words.txt"
|
||||
},
|
||||
"command": {
|
||||
"arguments": [],
|
||||
"program": ""
|
||||
},
|
||||
"conversation": {
|
||||
"handle_speech": true
|
||||
},
|
||||
"fuzzywuzzy": {
|
||||
"examples_json": "intent_examples.json",
|
||||
"min_confidence": 0
|
||||
},
|
||||
"fsticuffs": {
|
||||
"intent_fst": "intent.fst",
|
||||
"ignore_unknown_words": true,
|
||||
"fuzzy": true
|
||||
},
|
||||
"flair": {
|
||||
"cache_dir": "flair/cache",
|
||||
"data_dir": "flair/data",
|
||||
"embeddings": [],
|
||||
"max_epochs": 25,
|
||||
"do_sampling": true,
|
||||
"num_samples": 10000,
|
||||
"compatible": true
|
||||
},
|
||||
"rasa": {
|
||||
"examples_markdown": "intent_examples.md",
|
||||
"project_name": "rhasspy",
|
||||
"url": "http://localhost:5005/"
|
||||
},
|
||||
"remote": {
|
||||
"url": "http://my-server:12101/api/text-to-intent"
|
||||
},
|
||||
"replace_numbers": true,
|
||||
"system": "fsticuffs"
|
||||
},
|
||||
"language": "",
|
||||
"microphone": {
|
||||
"arecord": {
|
||||
"chunk_size": 960,
|
||||
"device": ""
|
||||
},
|
||||
"pyaudio": {
|
||||
"device": "",
|
||||
"frames_per_buffer": 480
|
||||
},
|
||||
"stdin": {
|
||||
"auto_start": true,
|
||||
"chunk_size": 960
|
||||
},
|
||||
"http": {
|
||||
"host": "127.0.0.1",
|
||||
"port": 12333,
|
||||
"stop_after": "never"
|
||||
},
|
||||
"gstreamer": {
|
||||
"pipeline": "udpsrc port=12333 ! rawaudioparse use-sink-caps=false format=pcm pcm-format=s16le sample-rate=16000 num-channels=1 ! queue ! audioconvert ! audioresample"
|
||||
},
|
||||
"system": "pyaudio"
|
||||
},
|
||||
"mqtt": {
|
||||
"enabled": false,
|
||||
"host": "localhost",
|
||||
"password": "",
|
||||
"port": 1883,
|
||||
"publish_intents": true,
|
||||
"reconnect_sec": 5,
|
||||
"site_id": "default",
|
||||
"username": ""
|
||||
},
|
||||
"rhasspy": {
|
||||
"listen_on_start": true,
|
||||
"load_timeout_sec": 15,
|
||||
"preload_profile": true
|
||||
},
|
||||
"sounds": {
|
||||
"recorded": "${RHASSPY_BASE_DIR}/etc/wav/beep_lo.wav",
|
||||
"system": "aplay",
|
||||
"wake": "${RHASSPY_BASE_DIR}/etc/wav/beep_hi.wav"
|
||||
},
|
||||
"speech_to_text": {
|
||||
"command": {
|
||||
"arguments": [],
|
||||
"program": ""
|
||||
},
|
||||
"dictionary_casing": "",
|
||||
"g2p_casing": "",
|
||||
"grammars_dir": "grammars",
|
||||
"fsts_dir": "fsts",
|
||||
"kaldi": {
|
||||
"base_dictionary": "base_dictionary.txt",
|
||||
"base_language_model": "base_language_model.txt",
|
||||
"compatible": false,
|
||||
"custom_words": "custom_words.txt",
|
||||
"dictionary": "dictionary.txt",
|
||||
"graph": "graph",
|
||||
"base_graph": "base_graph",
|
||||
"kaldi_dir": "${KALDI_PREFIX}/kaldi",
|
||||
"language_model": "language_model.txt",
|
||||
"model_dir": "model",
|
||||
"unknown_words": "unknown_words.txt",
|
||||
"mix_weight": 0,
|
||||
"mix_fst": "mixed.fst",
|
||||
"g2p_model": "g2p.fst",
|
||||
"phoneme_examples": "phoneme_examples.txt",
|
||||
"phoneme_map": "espeak_phonemes.txt",
|
||||
"open_transcription": false
|
||||
},
|
||||
"pocketsphinx": {
|
||||
"acoustic_model": "acoustic_model",
|
||||
"base_dictionary": "base_dictionary.txt",
|
||||
"base_language_model": "base_language_model.txt",
|
||||
"compatible": true,
|
||||
"custom_words": "custom_words.txt",
|
||||
"dictionary": "dictionary.txt",
|
||||
"language_model": "language_model.txt",
|
||||
"min_confidence": 0,
|
||||
"mllr_matrix": "acoustic_model_mllr",
|
||||
"unknown_words": "unknown_words.txt",
|
||||
"mix_weight": 0,
|
||||
"mix_fst": "mixed.fst",
|
||||
"g2p_model": "g2p.fst",
|
||||
"phoneme_examples": "phoneme_examples.txt",
|
||||
"phoneme_map": "espeak_phonemes.txt",
|
||||
"open_transcription": false
|
||||
},
|
||||
"remote": {
|
||||
"url": "http://my-server:12101/api/speech-to-text"
|
||||
},
|
||||
"sentences_ini": "sentences.ini",
|
||||
"slots_dir": "slots",
|
||||
"system": "dummy"
|
||||
},
|
||||
"text_to_speech": {
|
||||
"command": {
|
||||
"arguments": [],
|
||||
"program": ""
|
||||
},
|
||||
"espeak": {},
|
||||
"flite": {
|
||||
"voice": "kal16"
|
||||
},
|
||||
"marytts": {
|
||||
"url": "http://localhost:59125"
|
||||
},
|
||||
"picotts": {},
|
||||
"system": "espeak",
|
||||
"wavenet": {
|
||||
"cache_dir": "tts/googlewavenet/cache",
|
||||
"credentials_json": "tts/googlewavenet/credentials.json",
|
||||
"gender": "FEMALE",
|
||||
"language_code": "en-US",
|
||||
"sample_rate": 22050,
|
||||
"url": "https://texttospeech.googleapis.com/v1/text:synthesize",
|
||||
"voice": "Wavenet-C",
|
||||
"fallback_tts": "espeak"
|
||||
}
|
||||
},
|
||||
"training": {
|
||||
"dictionary_number_duplicates": true,
|
||||
"grammars": {
|
||||
"delete_before_training": true
|
||||
"home_assistant": {
|
||||
"access_token": "",
|
||||
"api_password": "",
|
||||
"event_type_format": "rhasspy_{0}",
|
||||
"pem_file": "",
|
||||
"url": "http://hassio/homeassistant/"
|
||||
},
|
||||
"intent": {
|
||||
"command": {
|
||||
"arguments": [],
|
||||
"program": ""
|
||||
},
|
||||
"intent_map": "intent_map.json",
|
||||
"system": "auto"
|
||||
"adapt": {
|
||||
"stop_words": "stop_words.txt"
|
||||
},
|
||||
"command": {
|
||||
"arguments": [],
|
||||
"program": ""
|
||||
},
|
||||
"fuzzywuzzy": {
|
||||
"examples_json": "intent_examples.json",
|
||||
"min_confidence": 0
|
||||
},
|
||||
"fsticuffs": {
|
||||
"intent_fst": "intent.fst",
|
||||
"ignore_unknown_words": true
|
||||
},
|
||||
"flair": {
|
||||
"cache_dir": "flair/cache",
|
||||
"data_dir": "flair/data",
|
||||
"embeddings": [],
|
||||
"max_epochs": 25,
|
||||
"do_sampling": true,
|
||||
"num_samples": 10000,
|
||||
"compatible": true
|
||||
},
|
||||
"rasa": {
|
||||
"examples_markdown": "intent_examples.md",
|
||||
"project_name": "rhasspy",
|
||||
"url": "http://localhost:5000/"
|
||||
},
|
||||
"remote": {
|
||||
"url": "http://my-server:12101/api/text-to-intent"
|
||||
},
|
||||
"system": "fsticuffs"
|
||||
},
|
||||
"regex": {
|
||||
"split": "\\s+"
|
||||
"language": "",
|
||||
"microphone": {
|
||||
"arecord": {
|
||||
"chunk_size": 960,
|
||||
"device": ""
|
||||
},
|
||||
"pyaudio": {
|
||||
"device": "",
|
||||
"frames_per_buffer": 480
|
||||
},
|
||||
"stdin": {
|
||||
"auto_start": true,
|
||||
"chunk_size": 960
|
||||
},
|
||||
"system": "pyaudio"
|
||||
},
|
||||
"mqtt": {
|
||||
"enabled": false,
|
||||
"host": "localhost",
|
||||
"password": "",
|
||||
"port": 1883,
|
||||
"publish_intents": true,
|
||||
"reconnect_sec": 5,
|
||||
"site_id": "default",
|
||||
"username": ""
|
||||
},
|
||||
"rhasspy": {
|
||||
"listen_on_start": true,
|
||||
"load_timeout_sec": 15,
|
||||
"preload_profile": true
|
||||
},
|
||||
"sounds": {
|
||||
"recorded": "etc/wav/beep_lo.wav",
|
||||
"system": "aplay",
|
||||
"wake": "etc/wav/beep_hi.wav"
|
||||
},
|
||||
"speech_to_text": {
|
||||
"command": {
|
||||
"arguments": [],
|
||||
"program": ""
|
||||
},
|
||||
"system": "auto"
|
||||
"command": {
|
||||
"arguments": [],
|
||||
"program": ""
|
||||
},
|
||||
"dictionary_casing": "",
|
||||
"g2p_casing": "",
|
||||
"g2p_model": "g2p.fst",
|
||||
"grammars_dir": "grammars",
|
||||
"fsts_dir": "fsts",
|
||||
"kaldi": {
|
||||
"base_dictionary": "base_dictionary.txt",
|
||||
"base_language_model": "base_language_model.txt",
|
||||
"compatible": false,
|
||||
"custom_words": "custom_words.txt",
|
||||
"dictionary": "dictionary.txt",
|
||||
"graph": "graph",
|
||||
"kaldi_dir": "/opt/kaldi",
|
||||
"language_model": "language_model.txt",
|
||||
"model_dir": "model",
|
||||
"unknown_words": "unknown_words.txt",
|
||||
"mix_weight": 0.0,
|
||||
"mix_fst": "mixed.fst"
|
||||
},
|
||||
"pocketsphinx": {
|
||||
"acoustic_model": "acoustic_model",
|
||||
"base_dictionary": "base_dictionary.txt",
|
||||
"base_language_model": "base_language_model.txt",
|
||||
"compatible": true,
|
||||
"custom_words": "custom_words.txt",
|
||||
"dictionary": "dictionary.txt",
|
||||
"language_model": "language_model.txt",
|
||||
"min_confidence": 0,
|
||||
"mllr_matrix": "acoustic_model_mllr",
|
||||
"unknown_words": "unknown_words.txt",
|
||||
"mix_weight": 0.0,
|
||||
"mix_fst": "mixed.fst"
|
||||
},
|
||||
"remote": {
|
||||
"url": "http://my-server:12101/api/speech-to-text"
|
||||
},
|
||||
"sentences_ini": "sentences.ini",
|
||||
"slots_dir": "slots",
|
||||
"system": "pocketsphinx"
|
||||
},
|
||||
"tokenizer": "regex",
|
||||
"unknown_words": {
|
||||
"fail_when_present": true,
|
||||
"guess_pronunciations": true
|
||||
}
|
||||
},
|
||||
"wake": {
|
||||
"command": {
|
||||
"arguments": [],
|
||||
"program": ""
|
||||
"text_to_speech": {
|
||||
"command": {
|
||||
"arguments": [],
|
||||
"program": ""
|
||||
},
|
||||
"espeak": {
|
||||
"phoneme_map": "espeak_phonemes.txt",
|
||||
"ipa_map": "ipa_phonemes.txt"
|
||||
},
|
||||
"flite": {
|
||||
"voice": "kal16"
|
||||
},
|
||||
"marytts": {
|
||||
"url": "http://localhost:59125"
|
||||
},
|
||||
"phoneme_examples": "phoneme_examples.txt",
|
||||
"picotts": {},
|
||||
"system": "espeak",
|
||||
"wavenet": {
|
||||
"cache_dir": "tts/googlewavenet/cache",
|
||||
"credentials_json": "tts/googlewavenet/credentials.json",
|
||||
"gender": "FEMALE",
|
||||
"language_code": "en-US",
|
||||
"sample_rate": 22050,
|
||||
"url": "https://texttospeech.googleapis.com/v1/text:synthesize",
|
||||
"voice": "Wavenet-C",
|
||||
"fallback_tts": "espeak"
|
||||
}
|
||||
},
|
||||
"hermes": {
|
||||
"wakeword_id": "default"
|
||||
"training": {
|
||||
"dictionary_number_duplicates": true,
|
||||
"grammars": {
|
||||
"delete_before_training": true
|
||||
},
|
||||
"intent": {
|
||||
"command": {
|
||||
"arguments": [],
|
||||
"program": ""
|
||||
},
|
||||
"intent_map": "intent_map.json",
|
||||
"system": "auto"
|
||||
},
|
||||
"regex": {
|
||||
"split": "\\s+"
|
||||
},
|
||||
"speech_to_text": {
|
||||
"command": {
|
||||
"arguments": [],
|
||||
"program": ""
|
||||
},
|
||||
"system": "auto"
|
||||
},
|
||||
"tokenizer": "regex",
|
||||
"unknown_words": {
|
||||
"fail_when_present": true,
|
||||
"guess_pronunciations": true
|
||||
}
|
||||
},
|
||||
"pocketsphinx": {
|
||||
"chunk_size": 960,
|
||||
"compatible": true,
|
||||
"keyphrase": "okay rhasspy",
|
||||
"mllr_matrix": "wake_mllr",
|
||||
"threshold": 1e-30
|
||||
},
|
||||
"precise": {
|
||||
"chunk_delay": 0.005,
|
||||
"chunk_size": 2048,
|
||||
"engine_path": "precise-engine",
|
||||
"model": "precise/hey-mycroft-2.pb",
|
||||
"sensitivity": 0.5,
|
||||
"trigger_level": 3
|
||||
},
|
||||
"snowboy": {
|
||||
"apply_frontend": false,
|
||||
"audio_gain": 1,
|
||||
"chunk_size": 960,
|
||||
"model": "snowboy/snowboy.umdl",
|
||||
"sensitivity": 0.5
|
||||
},
|
||||
"porcupine": {
|
||||
"library_path": "porcupine/libpv_porcupine.so",
|
||||
"model_path": "porcupine/porcupine_params.pv",
|
||||
"keyword_path": "porcupine/porcupine.ppn",
|
||||
"sensitivity": 0.5
|
||||
},
|
||||
"system": "dummy"
|
||||
},
|
||||
"download": {
|
||||
"cache_dir": "download",
|
||||
"conditions": {
|
||||
"wake.system": {
|
||||
"snowboy": {
|
||||
"snowboy/snowboy.umdl": "snowboy.umdl"
|
||||
"wake": {
|
||||
"command": {
|
||||
"arguments": [],
|
||||
"program": ""
|
||||
},
|
||||
"hermes": {
|
||||
"wakeword_id": "default"
|
||||
},
|
||||
"pocketsphinx": {
|
||||
"chunk_size": 960,
|
||||
"compatible": true,
|
||||
"keyphrase": "okay rhasspy",
|
||||
"mllr_matrix": "wake_mllr",
|
||||
"threshold": 1e-30
|
||||
},
|
||||
"precise": {
|
||||
"precise/hey-mycroft-2.pb": "hey-mycroft-2.pb",
|
||||
"precise/hey-mycroft-2.pb.params": "hey-mycroft-2.pb.params"
|
||||
"chunk_delay": 0.005,
|
||||
"chunk_size": 2048,
|
||||
"engine_path": "precise-engine",
|
||||
"model": "hey-mycroft-2.pb",
|
||||
"sensitivity": 0.5,
|
||||
"trigger_level": 3
|
||||
},
|
||||
"porcupine": {
|
||||
"porcupine/porcupine_params.pv": "porcupine_params.pv",
|
||||
"porcupine/libpv_porcupine.so": "libpv_porcupine.so",
|
||||
"porcupine/porcupine.ppn": "porcupine.ppn"
|
||||
}
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"snowboy.umdl": {
|
||||
"url": "https://github.com/Kitt-AI/snowboy/raw/master/resources/models/snowboy.umdl",
|
||||
"cache": false
|
||||
},
|
||||
"hey-mycroft-2.pb": {
|
||||
"url": "https://github.com/MycroftAI/precise-data/raw/models/hey-mycroft-2.pb",
|
||||
"cache": false
|
||||
},
|
||||
"hey-mycroft-2.pb.params": {
|
||||
"url": "https://github.com/MycroftAI/precise-data/raw/models/hey-mycroft-2.pb.params",
|
||||
"cache": false
|
||||
},
|
||||
"porcupine_params.pv": {
|
||||
"url": "https://github.com/Picovoice/Porcupine/raw/master/lib/common/porcupine_params.pv",
|
||||
"cache": false
|
||||
},
|
||||
"porcupine.ppn": {
|
||||
"cache": false,
|
||||
"x86_64": {
|
||||
"url": "https://github.com/Picovoice/Porcupine/raw/master/resources/keyword_files/linux/porcupine_linux.ppn"
|
||||
"snowboy": {
|
||||
"apply_frontend": false,
|
||||
"audio_gain": 1,
|
||||
"chunk_size": 960,
|
||||
"model": "snowboy.umdl",
|
||||
"sensitivity": 0.5
|
||||
},
|
||||
"armv7l": {
|
||||
"url": "https://github.com/Picovoice/Porcupine/raw/master/resources/keyword_files/raspberrypi/porcupine_raspberrypi.ppn"
|
||||
},
|
||||
"aarch64": {
|
||||
"url": "https://github.com/Picovoice/Porcupine/raw/master/resources/keyword_files/raspberrypi/porcupine_raspberrypi.ppn"
|
||||
}
|
||||
},
|
||||
"libpv_porcupine.so": {
|
||||
"cache": false,
|
||||
"x86_64": {
|
||||
"url": "https://github.com/Picovoice/Porcupine/raw/master/lib/linux/x86_64/libpv_porcupine.so"
|
||||
},
|
||||
"armv7l": {
|
||||
"url": "https://github.com/Picovoice/Porcupine/raw/master/lib/raspberry-pi/cortex-a53/libpv_porcupine.so"
|
||||
},
|
||||
"aarch64": {
|
||||
"url": "https://github.com/Picovoice/Porcupine/raw/master/lib/raspberry-pi/cortex-a53/libpv_porcupine.so"
|
||||
}
|
||||
}
|
||||
"system": "pocketsphinx"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Directory required as first argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DIR="$1"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Acoustic Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
acoustic_output="${DIR}/acoustic_model"
|
||||
|
||||
if [[ ! -d "${acoustic_output}" ]]; then
|
||||
echo "Missing acoustic model"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# G2P
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
g2p_output="${DIR}/g2p.fst"
|
||||
|
||||
if [[ ! -s "${g2p_output}" ]]; then
|
||||
echo "Missing g2p model"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Dictionary
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
dict_output="${DIR}/base_dictionary.txt"
|
||||
|
||||
if [[ ! -s "${dict_output}" ]]; then
|
||||
echo "Missing base dictionary"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Language Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
lm_output="${DIR}/base_language_model.txt"
|
||||
|
||||
if [[ ! -s "${lm_output}" ]]; then
|
||||
echo "Missing base language model"
|
||||
exit 1
|
||||
fi
|
||||
Executable
+95
@@ -0,0 +1,95 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Directory required as first argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DIR="$1"
|
||||
download_dir="${DIR}/download"
|
||||
|
||||
if [[ "$2" = "--delete" ]]; then
|
||||
rm -rf "${download_dir}"
|
||||
fi
|
||||
|
||||
mkdir -p "${download_dir}"
|
||||
|
||||
echo "Downloading Greek (el) profile (sphinx)"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Acoustic Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
acoustic_url='https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-el/cmusphinx-el-5.2.tar.gz'
|
||||
acoustic_file="${download_dir}/cmusphinx-el-5.2.tar.gz"
|
||||
acoustic_output="${DIR}/acoustic_model"
|
||||
|
||||
if [[ ! -s "${acoustic_file}" ]]; then
|
||||
echo "Downloading acoustic model (${acoustic_url})"
|
||||
curl -sSfL -o "${acoustic_file}" "${acoustic_url}"
|
||||
fi
|
||||
|
||||
echo "Extracting acoustic model (${acoustic_file})"
|
||||
rm -rf "${acoustic_output}"
|
||||
tar -C "${DIR}" -xf "${acoustic_file}" "cmusphinx-el-gr-5.2/el-gr.cd_cont_5000/" && mv "${DIR}/cmusphinx-el-gr-5.2/el-gr.cd_cont_5000" "${acoustic_output}" && rm -rf "${DIR}/cmusphinx-el-gr-5.2"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# G2P
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
g2p_url='https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-el/el-g2p.tar.gz'
|
||||
g2p_file="${download_dir}/el-g2p.tar.gz"
|
||||
g2p_output="${DIR}/g2p.fst"
|
||||
|
||||
if [[ ! -s "${g2p_file}" ]]; then
|
||||
echo "Downloading g2p model (${g2p_url})"
|
||||
curl -sSfL -o "${g2p_file}" "${g2p_url}"
|
||||
fi
|
||||
|
||||
echo "Extracting g2p model (${g2p_file})"
|
||||
tar --to-stdout -xzf "${g2p_file}" 'g2p.fst' > "${g2p_output}"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Dictionary
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
dict_output="${DIR}/base_dictionary.txt"
|
||||
echo "Extracting dictionary (${acoustic_file})"
|
||||
tar --to-stdout -xzf "${acoustic_file}" 'cmusphinx-el-gr-5.2/el-gr.dic' > "${dict_output}"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Language Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
lm_output="${DIR}/base_language_model.txt"
|
||||
echo "Extracting language model (${acoustic_file})"
|
||||
tar --to-stdout -xzf "${acoustic_file}" 'cmusphinx-el-gr-5.2/el-gr.lm.gz' | zcat > "${lm_output}"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Snowboy
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
snowboy_models=("snowboy.umdl" "computer.umdl")
|
||||
for model_name in "${snowboy_models[@]}"; do
|
||||
model_output="${DIR}/${model_name}"
|
||||
if [[ ! -s "${model_output}" ]]; then
|
||||
model_url="https://github.com/Kitt-AI/snowboy/raw/master/resources/models/${model_name}"
|
||||
echo "Downloading ${model_output} (${model_url})"
|
||||
curl -sSfL -o "${model_output}" "${model_url}"
|
||||
fi
|
||||
done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Mycroft Precise
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
precise_files=("hey-mycroft-2.pb" "hey-mycroft-2.pb.params")
|
||||
for file_name in "${precise_files[@]}"; do
|
||||
file_output="${DIR}/${file_name}"
|
||||
if [[ ! -s "${file_output}" ]]; then
|
||||
file_url="https://github.com/MycroftAI/precise-data/raw/models/${file_name}"
|
||||
echo "Downloading ${file_output} (${file_url})"
|
||||
curl -sSfL -o "${file_output}" "${file_url}"
|
||||
fi
|
||||
done
|
||||
@@ -1,41 +1,15 @@
|
||||
{
|
||||
"language": "el",
|
||||
"name": "el",
|
||||
"wake": {
|
||||
"system": "snowboy"
|
||||
},
|
||||
"speech_to_text": {
|
||||
"g2p_casing": "lower",
|
||||
"system": "pocketsphinx",
|
||||
"dictionary_casing": "lower"
|
||||
"g2p_casing": "lower"
|
||||
},
|
||||
"intent": {
|
||||
"flair": {
|
||||
"compatible": false
|
||||
}
|
||||
},
|
||||
"download": {
|
||||
"conditions": {
|
||||
"speech_to_text.system": {
|
||||
"pocketsphinx": {
|
||||
"acoustic_model": "cmusphinx-el-5.2.tar.gz:cmusphinx-el-gr-5.2/el-gr.cd_cont_5000",
|
||||
"base_dictionary.txt": "cmusphinx-el-5.2.tar.gz:cmusphinx-el-gr-5.2/el-gr.dic",
|
||||
"g2p.fst": "el-g2p.tar.gz:g2p.fst"
|
||||
}
|
||||
},
|
||||
|
||||
"speech_to_text.pocketsphinx.mix_weight": {
|
||||
">0": {
|
||||
"base_language_model.txt": "cmusphinx-el-5.2.tar.gz:cmusphinx-el-gr-5.2/el-gr.lm.gz:"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"files": {
|
||||
"cmusphinx-el-5.2.tar.gz": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-el/cmusphinx-el-5.2.tar.gz"
|
||||
},
|
||||
"el-g2p.tar.gz": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-el/el-g2p.tar.gz"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
[GetTemperature]
|
||||
τι θερμοκρασία έχει
|
||||
ποια είναι η θερμοκρασία
|
||||
πόσο (ζεστό | κρύο) είναι
|
||||
|
||||
[GetGarageState]
|
||||
είναι (ανοιχτή | κλειστή) η πόρτα του γκαράζ
|
||||
|
||||
[ChangeLightState]
|
||||
(σβήσε | άναψε){state} το φως του (γκαράζ){name}
|
||||
(ενεργοποιήστε | κλείστε){state} τη λάμπα του (καθιστικού){name}
|
||||
(απενεργοποιήστε | ανάψτε){state} το φως του (γκαράζ){name}
|
||||
|
||||
@@ -1,153 +0,0 @@
|
||||
ἀλλ’
|
||||
αλλα
|
||||
ἀλλά
|
||||
ἄλλοσ
|
||||
αν
|
||||
ἄν
|
||||
αντι
|
||||
απο
|
||||
ἀπό
|
||||
ἄρα
|
||||
αυτα
|
||||
αυτεσ
|
||||
αυτη
|
||||
αυτο
|
||||
αυτοι
|
||||
αυτοσ
|
||||
αὐτόσ
|
||||
αυτουσ
|
||||
αυτων
|
||||
γα^
|
||||
γάρ
|
||||
γε
|
||||
για
|
||||
δ’
|
||||
δαί
|
||||
δαίσ
|
||||
δε
|
||||
δέ
|
||||
δεν
|
||||
δή
|
||||
διά
|
||||
εαν
|
||||
ἐάν
|
||||
ἑαυτοῦ
|
||||
ἐγώ
|
||||
εἰ
|
||||
ειμαι
|
||||
ειμαστε
|
||||
εἰμί
|
||||
εἴμι
|
||||
ειναι
|
||||
εἰσ
|
||||
εισαι
|
||||
ειστε
|
||||
ἐκ
|
||||
εκεινα
|
||||
εκεινεσ
|
||||
εκεινη
|
||||
εκεινο
|
||||
εκεινοι
|
||||
εκεινοσ
|
||||
εκεινουσ
|
||||
εκεινων
|
||||
ἐμόσ
|
||||
ἐν
|
||||
ενω
|
||||
επι
|
||||
ἐπί
|
||||
ἔτι
|
||||
η
|
||||
ἡ
|
||||
ἤ
|
||||
θα
|
||||
ισωσ
|
||||
κ
|
||||
και
|
||||
καί
|
||||
κατα
|
||||
κατά
|
||||
κι
|
||||
μα
|
||||
με
|
||||
μέν
|
||||
μετα
|
||||
μετά
|
||||
μη
|
||||
μή
|
||||
μην
|
||||
να
|
||||
ο
|
||||
ὁ
|
||||
ὅδε
|
||||
οι
|
||||
οἱ
|
||||
ομωσ
|
||||
οπωσ
|
||||
ὅσ
|
||||
οσο
|
||||
ὅστισ
|
||||
οτι
|
||||
ὅτι
|
||||
οὐ
|
||||
οὐδέ
|
||||
οὐδείσ
|
||||
οὐκ
|
||||
οὖν
|
||||
οὔτε
|
||||
οὗτοσ
|
||||
οὕτωσ
|
||||
παρα
|
||||
παρά
|
||||
περί
|
||||
ποια
|
||||
ποιεσ
|
||||
ποιο
|
||||
ποιοι
|
||||
ποιοσ
|
||||
ποιουσ
|
||||
ποιων
|
||||
που
|
||||
προσ
|
||||
πρόσ
|
||||
πωσ
|
||||
σε
|
||||
σόσ
|
||||
στη
|
||||
στην
|
||||
στο
|
||||
στον
|
||||
σύ
|
||||
σύν
|
||||
τα
|
||||
τά
|
||||
τε
|
||||
τῇ
|
||||
την
|
||||
τήν
|
||||
τησ
|
||||
τῆσ
|
||||
τι
|
||||
τί
|
||||
τισ
|
||||
τίσ
|
||||
το
|
||||
τό
|
||||
τοί
|
||||
τοιοῦτοσ
|
||||
τον
|
||||
τόν
|
||||
τοτε
|
||||
του
|
||||
τοῦ
|
||||
τούσ
|
||||
τῷ
|
||||
των
|
||||
τῶν
|
||||
ὑμόσ
|
||||
ὑπέρ
|
||||
ὑπό
|
||||
ὦ
|
||||
ωσ
|
||||
ὡσ
|
||||
ὥστε
|
||||
|
||||
Executable
+67
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Directory required as first argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DIR="$1"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Acoustic Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
acoustic_output="${DIR}/acoustic_model"
|
||||
|
||||
if [[ ! -d "${acoustic_output}" ]]; then
|
||||
echo "Missing acoustic model"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# G2P
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
g2p_output="${DIR}/g2p.fst"
|
||||
|
||||
if [[ ! -s "${g2p_output}" ]]; then
|
||||
echo "Missing g2p model"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Dictionary
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
dict_output="${DIR}/base_dictionary.txt"
|
||||
|
||||
if [[ ! -s "${dict_output}" ]]; then
|
||||
echo "Missing base dictionary"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Language Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
lm_output="${DIR}/base_language_model.txt"
|
||||
|
||||
if [[ ! -s "${lm_output}" ]]; then
|
||||
echo "Missing base language model"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Flair Embeddings
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
flair_dir="${DIR}/flair/cache/embeddings"
|
||||
flair_files=("news-forward-0.4.1.pt" "news-backward-0.4.1.pt")
|
||||
for file_name in "${flair_files[@]}"; do
|
||||
file_output="${flair_dir}/${file_name}"
|
||||
if [[ ! -s "${file_output}" ]]; then
|
||||
echo "Missing flair embedding (${file_name})"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
Binary file not shown.
Executable
+43
@@ -0,0 +1,43 @@
|
||||
bedroom B EH D R UW M
|
||||
blue B L UW
|
||||
closed K L OW Z D
|
||||
cold K OW L D
|
||||
door D AO R
|
||||
garage G ER AA ZH
|
||||
green G R IY N
|
||||
hot HH AA T
|
||||
how HH AW
|
||||
is IH Z
|
||||
it IH T
|
||||
lamp L AE M P
|
||||
light L AY T
|
||||
living L IH V IH NG
|
||||
make M EY K
|
||||
me M IY
|
||||
off AO F
|
||||
okay OW K EY
|
||||
on AA N
|
||||
on(2) AO N
|
||||
open OW P AH N
|
||||
orange AO R AH N JH
|
||||
orange(2) AO R IH N JH
|
||||
purple P ER P AH L
|
||||
red R EH D
|
||||
rhasspy R AE S P IY
|
||||
room R UW M
|
||||
set S EH T
|
||||
tell T EH L
|
||||
temperature T EH M P R AH CH ER
|
||||
temperature(2) T EH M P ER AH CH ER
|
||||
the DH AH
|
||||
the(2) DH IY
|
||||
time T AY M
|
||||
to T UW
|
||||
to(2) T IH
|
||||
to(3) T AH
|
||||
turn T ER N
|
||||
what W AH T
|
||||
what(2) HH W AH T
|
||||
whats W AH T S
|
||||
whats(2) HH W AH T S
|
||||
yellow Y EH L OW
|
||||
Executable
+122
@@ -0,0 +1,122 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Directory required as first argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DIR="$1"
|
||||
download_dir="${DIR}/download"
|
||||
|
||||
if [[ "$2" = "--delete" ]]; then
|
||||
rm -rf "${download_dir}"
|
||||
fi
|
||||
|
||||
mkdir -p "${download_dir}"
|
||||
|
||||
echo "Downloading English (en) profile (sphinx)"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Acoustic Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
acoustic_url='https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/cmusphinx-en-us-5.2.tar.gz'
|
||||
|
||||
acoustic_file="${download_dir}/cmusphinx-en-us-5.2.tar.gz"
|
||||
echo "${acoustic_file}"
|
||||
acoustic_output="${DIR}/acoustic_model"
|
||||
|
||||
if [[ ! -s "${acoustic_file}" ]]; then
|
||||
echo "Downloading acoustic model (${acoustic_url})"
|
||||
curl -sSfL -o "${acoustic_file}" "${acoustic_url}"
|
||||
fi
|
||||
|
||||
echo "Extracting acoustic model (${acoustic_file})"
|
||||
rm -rf "${acoustic_output}"
|
||||
tar -C "${DIR}" -xzf "${acoustic_file}" && mv "${DIR}/cmusphinx-en-us-5.2" "${acoustic_output}"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# G2P
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
g2p_url='https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/en-g2p.tar.gz'
|
||||
g2p_file="${download_dir}/en-g2p.tar.gz"
|
||||
g2p_output="${DIR}/g2p.fst"
|
||||
|
||||
if [[ ! -s "${g2p_file}" ]]; then
|
||||
echo "Downloading g2p model"
|
||||
curl -sSfL -o "${g2p_file}" "${g2p_url}"
|
||||
fi
|
||||
|
||||
echo "Extracting g2p model (${g2p_file})"
|
||||
tar --to-stdout -xzf "${g2p_file}" 'g2p.fst' > "${g2p_output}"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Dictionary
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
dict_output="${DIR}/base_dictionary.txt"
|
||||
|
||||
echo "Extracting dictionary (${g2p_file})"
|
||||
tar --to-stdout -xzf "${g2p_file}" 'base_dictionary.txt' > "${dict_output}"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Language Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
lm_url='https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/en-70k-0.2-pruned.lm.gz'
|
||||
lm_file="${download_dir}/en-70k-0.2-pruned.lm.gz"
|
||||
lm_output="${DIR}/base_language_model.txt"
|
||||
|
||||
if [[ ! -s "${lm_file}" ]]; then
|
||||
echo "Downloading language model (${lm_url})"
|
||||
curl -sSfL -o "${lm_file}" "${lm_url}"
|
||||
fi
|
||||
|
||||
echo "Extracting language model (${lm_file})"
|
||||
zcat "${lm_file}" > "${lm_output}"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Snowboy
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
snowboy_models=("snowboy.umdl" "computer.umdl")
|
||||
for model_name in "${snowboy_models[@]}"; do
|
||||
model_output="${DIR}/${model_name}"
|
||||
if [[ ! -s "${model_output}" ]]; then
|
||||
model_url="https://github.com/Kitt-AI/snowboy/raw/master/resources/models/${model_name}"
|
||||
echo "Downloading ${model_output} (${model_url})"
|
||||
curl -sSfL -o "${model_output}" "${model_url}"
|
||||
fi
|
||||
done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Mycroft Precise
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
precise_files=("hey-mycroft-2.pb" "hey-mycroft-2.pb.params")
|
||||
for file_name in "${precise_files[@]}"; do
|
||||
file_output="${DIR}/${file_name}"
|
||||
if [[ ! -s "${file_output}" ]]; then
|
||||
file_url="https://github.com/MycroftAI/precise-data/raw/models/${file_name}"
|
||||
echo "Downloading ${file_output} (${file_url})"
|
||||
curl -sSfL -o "${file_output}" "${file_url}"
|
||||
fi
|
||||
done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Flair Embeddings
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
flair_dir="${DIR}/flair/cache/embeddings"
|
||||
mkdir -p "${flair_dir}"
|
||||
flair_files=("news-forward-0.4.1.pt" "news-backward-0.4.1.pt")
|
||||
for file_name in "${flair_files[@]}"; do
|
||||
file_output="${flair_dir}/${file_name}"
|
||||
if [[ ! -s "${file_output}" ]]; then
|
||||
file_url="https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/${file_name}"
|
||||
echo "Downloading ${file_output} (${file_url})"
|
||||
curl -sSfL -o "${file_output}" "${file_url}"
|
||||
fi
|
||||
done
|
||||
@@ -1 +0,0 @@
|
||||
vlc v l 'E s
|
||||
@@ -1,41 +0,0 @@
|
||||
3 3
|
||||
A A@
|
||||
D D
|
||||
E E
|
||||
I I
|
||||
N N
|
||||
O O:
|
||||
OI OI
|
||||
S S
|
||||
T T
|
||||
U U
|
||||
V @
|
||||
Z Z
|
||||
aI aI
|
||||
aU aU
|
||||
b b
|
||||
d d
|
||||
dZ dZ
|
||||
e e
|
||||
f f
|
||||
g g
|
||||
h h
|
||||
i i
|
||||
j j
|
||||
k k
|
||||
l l
|
||||
m m
|
||||
n n
|
||||
o o
|
||||
p p
|
||||
pf f
|
||||
r r
|
||||
s s
|
||||
t t
|
||||
tS tS
|
||||
ts ts
|
||||
u u:
|
||||
v v
|
||||
w w
|
||||
z z
|
||||
{ a
|
||||
@@ -1,41 +0,0 @@
|
||||
3 bird b 3 d
|
||||
A arts A r ts
|
||||
D than D { n
|
||||
E bear b E r
|
||||
I ages e I dZ V z
|
||||
N bang b { N
|
||||
O also O l s o U
|
||||
OI boys b OI z
|
||||
S bush b U S
|
||||
T bath b { T
|
||||
U boat b o U t
|
||||
V able e I b V l
|
||||
Z usual j u Z V w V l
|
||||
aI bike b aI k
|
||||
aU down d aU n
|
||||
b babe b e I b
|
||||
d andy { n d i
|
||||
dZ edge E dZ
|
||||
e amen e I m E n
|
||||
f face f e I s
|
||||
g bags b { g z
|
||||
h hadn h { d V n
|
||||
i area E r i V
|
||||
j cute k j u t
|
||||
k back b { k
|
||||
l alex { l V k s
|
||||
m army A r m i
|
||||
n alan { l V n
|
||||
o blow b l o U
|
||||
p camp k { m p
|
||||
pf pfft pf t
|
||||
r aren A r V n
|
||||
s asks { s k s
|
||||
t anti { n t i
|
||||
tS each i tS
|
||||
ts gets g E ts
|
||||
u blue b l u
|
||||
v dave d e I v
|
||||
w away V w e I
|
||||
z arms A r m z
|
||||
{ adam { d V m
|
||||
Executable
+241
@@ -0,0 +1,241 @@
|
||||
|
||||
\data\
|
||||
ngram 1=35
|
||||
ngram 2=83
|
||||
ngram 3=110
|
||||
|
||||
\1-grams:
|
||||
-0.725667 </s>
|
||||
-99 <s> -2.913284
|
||||
-1.098857 bedroom -1.670246
|
||||
-1.880682 blue -0.151015
|
||||
-1.898802 closed -0.143907
|
||||
-1.898802 cold -0.143907
|
||||
-1.898802 door -0.143907
|
||||
-1.255349 garage -0.771521
|
||||
-1.880682 green -0.151015
|
||||
-1.898802 hot -0.143907
|
||||
-1.898802 how -0.143907
|
||||
-1.255349 is -0.674611
|
||||
-1.898802 it -0.143907
|
||||
-1.898802 lamp -0.143907
|
||||
-1.255349 light -0.231380
|
||||
-1.255349 living -1.494155
|
||||
-1.898802 make -0.143907
|
||||
-1.898802 me -0.143907
|
||||
-1.361536 off -0.146263
|
||||
-1.361536 on -0.146263
|
||||
-1.898802 open -0.143907
|
||||
-1.880682 orange -0.151015
|
||||
-1.880682 purple -0.151015
|
||||
-1.880682 red -0.151015
|
||||
-1.898802 room -0.143907
|
||||
-1.898802 set -0.143907
|
||||
-1.898802 tell -0.143907
|
||||
-1.898802 temperature -0.143907
|
||||
-0.984060 the -0.885934
|
||||
-1.880682 time -0.143907
|
||||
-1.898802 to -0.143907
|
||||
-1.898802 turn -0.143907
|
||||
-1.898802 what -0.143907
|
||||
-1.898802 whats -0.143907
|
||||
-1.880682 yellow -0.151015
|
||||
|
||||
\2-grams:
|
||||
-0.875508 <s> how -1.271067
|
||||
-0.699154 <s> is -1.748188
|
||||
-1.176986 <s> make -0.970037
|
||||
-0.875508 <s> set -1.271067
|
||||
-1.000596 <s> tell -1.447158
|
||||
-0.699268 <s> turn -0.970037
|
||||
-1.000596 <s> what -1.447158
|
||||
-1.176986 <s> whats -1.271067
|
||||
-0.008854 bedroom light -0.831734
|
||||
-0.370037 blue </s>
|
||||
-0.379781 closed </s>
|
||||
-0.492238 cold is -1.271067
|
||||
-0.823651 door closed -1.447158
|
||||
-0.823651 door open -1.447158
|
||||
-1.232498 garage door -1.447158
|
||||
-0.105817 garage light -0.793946
|
||||
-0.370037 green </s>
|
||||
-0.492238 hot is -1.271067
|
||||
-0.823651 how cold -1.271067
|
||||
-0.823651 how hot -1.271067
|
||||
-0.142294 is it -1.815135
|
||||
-1.034058 is the -1.748188
|
||||
-0.379781 it </s>
|
||||
-0.640077 lamp </s>
|
||||
-0.902236 lamp off -0.669007
|
||||
-0.902236 lamp on -0.669007
|
||||
-0.832360 light </s>
|
||||
-0.727664 light blue -1.124939
|
||||
-1.595955 light green -0.726999
|
||||
-1.299018 light light -0.726999
|
||||
-1.205894 light off -0.970037
|
||||
-1.205894 light on -0.970037
|
||||
-1.595955 light orange -0.726999
|
||||
-1.595955 light purple -0.726999
|
||||
-1.595955 light red -0.726999
|
||||
-1.601397 light to -0.425969
|
||||
-1.595955 light yellow -0.726999
|
||||
-0.013966 living room -1.271067
|
||||
-0.702886 make bedroom -0.970037
|
||||
-0.666544 make the -0.970037
|
||||
-0.447904 me the -1.447158
|
||||
-0.634137 off </s>
|
||||
-0.983476 off bedroom -0.367977
|
||||
-1.062123 off garage -0.367977
|
||||
-1.062123 off living -0.367977
|
||||
-0.916912 off the -0.367977
|
||||
-0.634137 on </s>
|
||||
-0.983476 on bedroom -0.367977
|
||||
-1.062123 on garage -0.367977
|
||||
-1.062123 on living -0.367977
|
||||
-0.916912 on the -0.367977
|
||||
-0.379781 open </s>
|
||||
-0.370037 orange </s>
|
||||
-0.370037 purple </s>
|
||||
-0.370037 red </s>
|
||||
-0.535936 room lamp -0.793946
|
||||
-0.702886 set bedroom -1.271067
|
||||
-0.666544 set the -1.271067
|
||||
-0.535936 tell me -1.447158
|
||||
-0.379781 temperature </s>
|
||||
-0.445703 the bedroom -1.572097
|
||||
-0.547019 the garage -1.514105
|
||||
-0.672945 the living -0.970037
|
||||
-1.661781 the temperature -1.271067
|
||||
-1.660389 the time -1.447158
|
||||
-0.559005 time </s>
|
||||
-0.742550 time is -1.447158
|
||||
-1.303271 to blue -0.425969
|
||||
-1.303271 to green -0.425969
|
||||
-1.095977 to light -0.425969
|
||||
-1.303271 to orange -0.425969
|
||||
-1.303271 to purple -0.425969
|
||||
-1.303271 to red -0.425969
|
||||
-1.303271 to yellow -0.425969
|
||||
-0.982184 turn bedroom -0.669007
|
||||
-1.061043 turn garage -0.669007
|
||||
-1.061043 turn living -0.669007
|
||||
-1.106585 turn off -0.544068
|
||||
-1.106585 turn on -0.544068
|
||||
-0.915469 turn the -0.669007
|
||||
-0.535360 what time -1.447158
|
||||
-0.447904 whats the -1.271067
|
||||
-0.370037 yellow </s>
|
||||
|
||||
\3-grams:
|
||||
-0.317625 <s> how cold
|
||||
-0.317625 <s> how hot
|
||||
-0.007096 <s> is the
|
||||
-0.330065 <s> make bedroom
|
||||
-0.328347 <s> make the
|
||||
-0.315305 <s> set bedroom
|
||||
-0.314474 <s> set the
|
||||
-0.011137 <s> tell me
|
||||
-1.115549 <s> turn bedroom
|
||||
-1.126182 <s> turn garage
|
||||
-1.126182 <s> turn living
|
||||
-0.618839 <s> turn off
|
||||
-0.618839 <s> turn on
|
||||
-0.610552 <s> turn the
|
||||
-0.011131 <s> what time
|
||||
-0.015235 <s> whats the
|
||||
-0.875237 bedroom light </s>
|
||||
-1.067444 bedroom light blue
|
||||
-1.209216 bedroom light green
|
||||
-1.184183 bedroom light light
|
||||
-1.234501 bedroom light off
|
||||
-1.234501 bedroom light on
|
||||
-1.209216 bedroom light orange
|
||||
-1.209216 bedroom light purple
|
||||
-1.209216 bedroom light red
|
||||
-0.619254 bedroom light to
|
||||
-1.209216 bedroom light yellow
|
||||
-0.006549 cold is it
|
||||
-0.009137 door closed </s>
|
||||
-0.009137 door open </s>
|
||||
-0.312023 garage door closed
|
||||
-0.312023 garage door open
|
||||
-0.327836 garage light </s>
|
||||
-0.685222 garage light off
|
||||
-0.685222 garage light on
|
||||
-0.006549 hot is it
|
||||
-0.016069 how cold is
|
||||
-0.016069 how hot is
|
||||
-0.003892 is it </s>
|
||||
-0.005590 is the garage
|
||||
-0.078068 lamp off </s>
|
||||
-0.078068 lamp on </s>
|
||||
-0.019092 light blue </s>
|
||||
-0.049403 light green </s>
|
||||
-0.071808 light light blue
|
||||
-0.037282 light off </s>
|
||||
-0.037282 light on </s>
|
||||
-0.049403 light orange </s>
|
||||
-0.049403 light purple </s>
|
||||
-0.049403 light red </s>
|
||||
-0.966821 light to blue
|
||||
-0.966821 light to green
|
||||
-0.923177 light to light
|
||||
-0.966821 light to orange
|
||||
-0.966821 light to purple
|
||||
-0.966821 light to red
|
||||
-0.966821 light to yellow
|
||||
-0.049403 light yellow </s>
|
||||
-0.016814 living room lamp
|
||||
-0.000940 make bedroom light
|
||||
-0.030933 make the bedroom
|
||||
-0.015443 me the time
|
||||
-0.003772 off bedroom light
|
||||
-0.042237 off garage light
|
||||
-0.005931 off living room
|
||||
-0.463377 off the bedroom
|
||||
-0.505712 off the garage
|
||||
-0.550547 off the living
|
||||
-0.003772 on bedroom light
|
||||
-0.042237 on garage light
|
||||
-0.005931 on living room
|
||||
-0.463377 on the bedroom
|
||||
-0.505712 on the garage
|
||||
-0.550547 on the living
|
||||
-0.315838 room lamp </s>
|
||||
-0.664427 room lamp off
|
||||
-0.664427 room lamp on
|
||||
-0.000470 set bedroom light
|
||||
-0.015191 set the bedroom
|
||||
-0.010097 tell me the
|
||||
-0.000235 the bedroom light
|
||||
-0.073849 the garage door
|
||||
-0.819462 the garage light
|
||||
-0.001475 the living room
|
||||
-0.013778 the temperature </s>
|
||||
-0.011376 the time </s>
|
||||
-0.004355 time is it
|
||||
-0.105156 to blue </s>
|
||||
-0.105156 to green </s>
|
||||
-0.157887 to light blue
|
||||
-0.105156 to orange </s>
|
||||
-0.105156 to purple </s>
|
||||
-0.105156 to red </s>
|
||||
-0.105156 to yellow </s>
|
||||
-0.001882 turn bedroom light
|
||||
-0.020605 turn garage light
|
||||
-0.002955 turn living room
|
||||
-0.903377 turn off bedroom
|
||||
-0.920814 turn off garage
|
||||
-0.920814 turn off living
|
||||
-0.334262 turn off the
|
||||
-0.903377 turn on bedroom
|
||||
-0.920814 turn on garage
|
||||
-0.920814 turn on living
|
||||
-0.334262 turn on the
|
||||
-0.470195 turn the bedroom
|
||||
-0.491181 turn the garage
|
||||
-0.512284 turn the living
|
||||
-0.012894 what time is
|
||||
-0.023377 whats the temperature
|
||||
|
||||
\end\
|
||||
Executable
BIN
Binary file not shown.
Executable
+1
@@ -0,0 +1 @@
|
||||
{"window_t": 0.1, "hop_t": 0.05, "buffer_t": 1.5, "sample_rate": 16000, "sample_depth": 2, "n_mfcc": 13, "n_filt": 20, "n_fft": 512}
|
||||
+16
-87
@@ -1,94 +1,23 @@
|
||||
{
|
||||
"language": "en",
|
||||
"name": "en",
|
||||
"speech_to_text": {
|
||||
"system": "pocketsphinx",
|
||||
"dictionary_casing": "lower",
|
||||
"kaldi": {
|
||||
"base_dictionary": "kaldi/base_dictionary.txt",
|
||||
"base_language_model": "kaldi/base_language_model.txt",
|
||||
"compatible": true,
|
||||
"custom_words": "kaldi/custom_words.txt",
|
||||
"dictionary": "kaldi/dictionary.txt",
|
||||
"graph": "graph",
|
||||
"language_model": "kaldi/language_model.txt",
|
||||
"model_dir": "kaldi/model",
|
||||
"unknown_words": "kaldi/unknown_words.txt",
|
||||
"mix_fst": "kaldi/mixed.fst",
|
||||
"g2p_model": "kaldi/g2p.fst",
|
||||
"phoneme_examples": "kaldi/phoneme_examples.txt",
|
||||
"phoneme_map": "kaldi/espeak_phonemes.txt"
|
||||
}
|
||||
},
|
||||
"intent": {
|
||||
"flair": {
|
||||
"embeddings": [
|
||||
"news-forward-0.4.1.pt",
|
||||
"news-backward-0.4.1.pt"
|
||||
]
|
||||
}
|
||||
},
|
||||
"text_to_speech": {
|
||||
"wavenet": {
|
||||
"language_code": "en-US"
|
||||
"language": "en",
|
||||
"name": "en",
|
||||
"wake": {
|
||||
"system": "snowboy"
|
||||
},
|
||||
"marytts": {
|
||||
"locale": "en-US"
|
||||
}
|
||||
},
|
||||
"download": {
|
||||
"conditions": {
|
||||
"speech_to_text.system": {
|
||||
"pocketsphinx": {
|
||||
"acoustic_model": "cmusphinx-en-us-5.2.tar.gz:cmusphinx-en-us-5.2",
|
||||
"base_dictionary.txt": "en-g2p.tar.gz:base_dictionary.txt",
|
||||
"g2p.fst": "en-g2p.tar.gz:g2p.fst"
|
||||
},
|
||||
"kaldi": {
|
||||
"kaldi": "en_kaldi-zamia.tar.gz:kaldi"
|
||||
}
|
||||
},
|
||||
"speech_to_text.kaldi.open_transcription": {
|
||||
"True": {
|
||||
"kaldi/model/base_graph": "en_kaldi-zamia-base_graph.tar.gz:base_graph"
|
||||
}
|
||||
},
|
||||
"speech_to_text.pocketsphinx.mix_weight": {
|
||||
">0": {
|
||||
"base_language_model.txt": "en-70k-0.2-pruned.lm.gz:en-70k-0.2-pruned.lm"
|
||||
}
|
||||
},
|
||||
"intent.system": {
|
||||
"intent": {
|
||||
"flair": {
|
||||
"flair/cache/embeddings/news-forward-0.4.1.pt": "news-forward-0.4.1.pt",
|
||||
"flair/cache/embeddings/news-backward-0.4.1.pt": "news-backward-0.4.1.pt"
|
||||
"embeddings": [
|
||||
"news-forward-0.4.1.pt",
|
||||
"news-backward-0.4.1.pt"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"cmusphinx-en-us-5.2.tar.gz": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/cmusphinx-en-us-5.2.tar.gz"
|
||||
},
|
||||
"en-70k-0.2-pruned.lm.gz": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/en-70k-0.2-pruned.lm.gz"
|
||||
},
|
||||
"en-g2p.tar.gz": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/en-g2p.tar.gz"
|
||||
},
|
||||
"news-forward-0.4.1.pt": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/news-forward-0.4.1.pt",
|
||||
"cache": false
|
||||
},
|
||||
"news-backward-0.4.1.pt": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/news-backward-0.4.1.pt",
|
||||
"cache": false
|
||||
},
|
||||
"en_kaldi-zamia.tar.gz": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/en_kaldi-zamia.tar.gz"
|
||||
},
|
||||
"en_kaldi-zamia-base_graph.tar.gz": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-en/en_kaldi-zamia-base_graph.tar.gz"
|
||||
}
|
||||
"text_to_speech": {
|
||||
"wavenet": {
|
||||
"language_code": "en-US"
|
||||
},
|
||||
"marytts": {
|
||||
"locale": "en-US"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
purple
|
||||
yellow
|
||||
orange
|
||||
light blue
|
||||
Executable
BIN
Binary file not shown.
Executable
+67
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Directory required as first argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DIR="$1"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Acoustic Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
acoustic_output="${DIR}/acoustic_model"
|
||||
|
||||
if [[ ! -d "${acoustic_output}" ]]; then
|
||||
echo "Missing acoustic model"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# G2P
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
g2p_output="${DIR}/g2p.fst"
|
||||
|
||||
if [[ ! -s "${g2p_output}" ]]; then
|
||||
echo "Missing g2p model"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Dictionary
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
dict_output="${DIR}/base_dictionary.txt"
|
||||
|
||||
if [[ ! -s "${dict_output}" ]]; then
|
||||
echo "Missing base dictionary"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Language Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
lm_output="${DIR}/base_language_model.txt"
|
||||
|
||||
if [[ ! -s "${lm_output}" ]]; then
|
||||
echo "Missing base language model"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Flair Embeddings
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
flair_dir="${DIR}/flair/cache/embeddings"
|
||||
flair_files=("lm-es-forward-fast.pt" "lm-es-backward-fast.pt")
|
||||
for file_name in "${flair_files[@]}"; do
|
||||
file_output="${flair_dir}/${file_name}"
|
||||
if [[ ! -s "${file_output}" ]]; then
|
||||
echo "Missing flair embedding (${file_name})"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
Executable
+111
@@ -0,0 +1,111 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Directory required as first argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DIR="$1"
|
||||
download_dir="${DIR}/download"
|
||||
|
||||
if [[ "$2" = "--delete" ]]; then
|
||||
rm -rf "${download_dir}"
|
||||
fi
|
||||
|
||||
mkdir -p "${download_dir}"
|
||||
|
||||
echo "Downloading Spanish (es) profile (sphinx)"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Acoustic Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
acoustic_url='https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-es/cmusphinx-es-5.2.tar.gz'
|
||||
acoustic_file="${download_dir}/cmusphinx-es-5.2.tar.gz"
|
||||
acoustic_output="${DIR}/acoustic_model"
|
||||
|
||||
if [[ ! -s "${acoustic_file}" ]]; then
|
||||
echo "Downloading acoustic model (${acoustic_url})"
|
||||
curl -sSfL -o "${acoustic_file}" "${acoustic_url}"
|
||||
fi
|
||||
|
||||
echo "Extracting acoustic model (${acoustic_file})"
|
||||
rm -rf "${acoustic_output}"
|
||||
tar -C "${DIR}" -xf "${acoustic_file}" "cmusphinx-es-5.2/model_parameters/voxforge_es_sphinx.cd_ptm_4000/" && mv "${DIR}/cmusphinx-es-5.2/model_parameters/voxforge_es_sphinx.cd_ptm_4000/" "${acoustic_output}" && rm -rf "${DIR}/cmusphinx-es-5.2"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# G2P
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
g2p_url='https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-es/es-g2p.tar.gz'
|
||||
g2p_file="${download_dir}/es-g2p.tar.gz"
|
||||
g2p_output="${DIR}/g2p.fst"
|
||||
|
||||
if [[ ! -s "${g2p_file}" ]]; then
|
||||
echo "Downloading g2p model (${g2p_url})"
|
||||
curl -sSfL -o "${g2p_file}" "${g2p_url}"
|
||||
fi
|
||||
|
||||
echo "Extracting g2p model (${g2p_file})"
|
||||
tar --to-stdout -xzf "${g2p_file}" 'g2p.fst' > "${g2p_output}"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Dictionary
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
dict_output="${DIR}/base_dictionary.txt"
|
||||
echo "Extracting dictionary (${acoustic_file})"
|
||||
tar --to-stdout -xf "${acoustic_file}" "cmusphinx-es-5.2/etc/voxforge_es_sphinx.dic" > "${dict_output}"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Language Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
lm_output="${DIR}/base_language_model.txt"
|
||||
echo "Extracting language model (${acoustic_file})"
|
||||
tar --to-stdout -xf "${acoustic_file}" "cmusphinx-es-5.2/etc/es-20k.lm.gz" | zcat > "${lm_output}"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Snowboy
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
snowboy_models=("snowboy.umdl" "computer.umdl")
|
||||
for model_name in "${snowboy_models[@]}"; do
|
||||
model_output="${DIR}/${model_name}"
|
||||
if [[ ! -s "${model_output}" ]]; then
|
||||
model_url="https://github.com/Kitt-AI/snowboy/raw/master/resources/models/${model_name}"
|
||||
echo "Downloading ${model_output} (${model_url})"
|
||||
curl -sSfL -o "${model_output}" "${model_url}"
|
||||
fi
|
||||
done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Mycroft Precise
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
precise_files=("hey-mycroft-2.pb" "hey-mycroft-2.pb.params")
|
||||
for file_name in "${precise_files[@]}"; do
|
||||
file_output="${DIR}/${file_name}"
|
||||
if [[ ! -s "${file_output}" ]]; then
|
||||
file_url="https://github.com/MycroftAI/precise-data/raw/models/${file_name}"
|
||||
echo "Downloading ${file_output} (${file_url})"
|
||||
curl -sSfL -o "${file_output}" "${file_url}"
|
||||
fi
|
||||
done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Flair Embeddings
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
flair_dir="${DIR}/flair/cache/embeddings"
|
||||
mkdir -p "${flair_dir}"
|
||||
flair_files=("lm-es-forward-fast.pt" "lm-es-backward-fast.pt")
|
||||
for file_name in "${flair_files[@]}"; do
|
||||
file_output="${flair_dir}/${file_name}"
|
||||
if [[ ! -s "${file_output}" ]]; then
|
||||
file_url="https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-es/${file_name}"
|
||||
echo "Downloading ${file_output} (${file_url})"
|
||||
curl -sSfL -o "${file_output}" "${file_url}"
|
||||
fi
|
||||
done
|
||||
@@ -0,0 +1,25 @@
|
||||
a abre əbɹˈɛ
|
||||
b baja bˈɑhɑ
|
||||
ch ocho ˈɒtʃəʊ
|
||||
d anda ˈændə
|
||||
e aire ˈɛə
|
||||
f café kæfˈeɪ
|
||||
g agua ˈæɡjʉːə
|
||||
gn años sˈænsəːn
|
||||
i allí ˈælɪ
|
||||
j bajo bˈɑdʒəʊ
|
||||
k acto ˈæktəʊ
|
||||
l alex ˈælɪks
|
||||
ll allá əlˈɑ
|
||||
m alma ˈɒlmə
|
||||
n andy ˈændɪ
|
||||
o algo ˈælɡəʊ
|
||||
p copa kˈəʊpə
|
||||
r amor ˈæmɚ
|
||||
rr raro ɹˈæɹəʊ
|
||||
s base bˈeɪs
|
||||
t alta ˈɔːltə
|
||||
u auto ˈɔːtəʊ
|
||||
x sexo sˈiksəʊ
|
||||
y ayer ˈaɪɚ
|
||||
z azul æzˈʉːl
|
||||
@@ -0,0 +1,25 @@
|
||||
a abre a
|
||||
b baja b
|
||||
ch ocho tʃ
|
||||
d anda d
|
||||
e aire e
|
||||
f café f
|
||||
g agua g
|
||||
gn años ɲ
|
||||
i allí i
|
||||
j bajo j
|
||||
k acto k
|
||||
l alex l
|
||||
ll allá ʎ
|
||||
m alma m
|
||||
n andy n
|
||||
o algo o
|
||||
p copa p
|
||||
r amor r
|
||||
rr raro ɾ
|
||||
s base s
|
||||
t alta t
|
||||
u auto u
|
||||
x sexo x
|
||||
y ayer ʝ
|
||||
z azul z
|
||||
@@ -1,22 +1,25 @@
|
||||
A A A
|
||||
B VEZ B E Z
|
||||
CH MUCHO M U CH O
|
||||
D DE D E
|
||||
E EL E L
|
||||
F FUE F U E
|
||||
G ALGO A L G O
|
||||
GN AñOS A GN O S
|
||||
I Y I
|
||||
K CON K O N
|
||||
L AL A L
|
||||
LL ELLA E LL A
|
||||
M ME M E
|
||||
N EN E N
|
||||
O O O
|
||||
P POR P O R
|
||||
R ERA E R A
|
||||
S ES E S
|
||||
T TE T E
|
||||
U SU S U
|
||||
Y YA Y A
|
||||
Z HACE A Z E
|
||||
a abre a b r e
|
||||
b baja b a j a
|
||||
ch ocho o ch o
|
||||
d anda a n d a
|
||||
e aire a i r e
|
||||
f café k a f e
|
||||
g agua a g u a
|
||||
gn años a gn o s
|
||||
i allí a ll i
|
||||
j bajo b a j o
|
||||
k acto a k t o
|
||||
l alex a l e x
|
||||
ll allá a ll a
|
||||
m alma a l m a
|
||||
n andy a n d i
|
||||
o algo a l g o
|
||||
p copa k o p a
|
||||
r amor a m o r
|
||||
rr raro rr a r o
|
||||
s base b a s e
|
||||
t alta a l t a
|
||||
u auto a u t o
|
||||
x sexo s e x o
|
||||
y ayer a y e r
|
||||
z azul a z u l
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
{
|
||||
"language": "es",
|
||||
"name": "es",
|
||||
"speech_to_text": {
|
||||
"system": "pocketsphinx",
|
||||
"dictionary_casing": "lower"
|
||||
"wake": {
|
||||
"system": "snowboy"
|
||||
},
|
||||
"text_to_speech": {
|
||||
"wavenet": {
|
||||
@@ -17,46 +16,5 @@
|
||||
"lm-es-backward-fast.pt"
|
||||
]
|
||||
}
|
||||
},
|
||||
"download": {
|
||||
"conditions": {
|
||||
"speech_to_text.system": {
|
||||
"pocketsphinx": {
|
||||
"acoustic_model": "cmusphinx-es-5.2.tar.gz:cmusphinx-es-5.2/model_parameters/voxforge_es_sphinx.cd_ptm_4000/",
|
||||
"base_dictionary.txt": "cmusphinx-es-5.2.tar.gz:cmusphinx-es-5.2/etc/voxforge_es_sphinx.dic",
|
||||
"g2p.fst": "es-g2p.tar.gz:g2p.fst"
|
||||
}
|
||||
},
|
||||
|
||||
"speech_to_text.pocketsphinx.mix_weight": {
|
||||
">0": {
|
||||
"base_language_model.txt": "cmusphinx-es-5.2.tar.gz:cmusphinx-es-5.2/etc/es-20k.lm.gz:"
|
||||
}
|
||||
},
|
||||
|
||||
"intent.system": {
|
||||
"flair": {
|
||||
"flair/cache/embeddings/lm-es-forward-fast.pt": "lm-es-forward-fast.pt",
|
||||
"flair/cache/embeddingslm-es-backward-fast.pt": "lm-es-backward-fast.pt"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"files": {
|
||||
"cmusphinx-es-5.2.tar.gz": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-es/cmusphinx-es-5.2.tar.gz"
|
||||
},
|
||||
"es-g2p.tar.gz": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-es/es-g2p.tar.gz"
|
||||
},
|
||||
"lm-es-forward-fast.pt": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-es/lm-es-forward-fast.pt",
|
||||
"cache": false
|
||||
},
|
||||
"lm-es-backward-fast.pt": {
|
||||
"url": "https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-es/lm-es-backward-fast.pt",
|
||||
"cache": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,313 +0,0 @@
|
||||
de
|
||||
la
|
||||
que
|
||||
el
|
||||
en
|
||||
y
|
||||
a
|
||||
los
|
||||
del
|
||||
se
|
||||
las
|
||||
por
|
||||
un
|
||||
para
|
||||
con
|
||||
no
|
||||
una
|
||||
su
|
||||
al
|
||||
lo
|
||||
como
|
||||
más
|
||||
pero
|
||||
sus
|
||||
le
|
||||
ya
|
||||
o
|
||||
este
|
||||
sí
|
||||
porque
|
||||
esta
|
||||
entre
|
||||
cuando
|
||||
muy
|
||||
sin
|
||||
sobre
|
||||
también
|
||||
me
|
||||
hasta
|
||||
hay
|
||||
donde
|
||||
quien
|
||||
desde
|
||||
todo
|
||||
nos
|
||||
durante
|
||||
todos
|
||||
uno
|
||||
les
|
||||
ni
|
||||
contra
|
||||
otros
|
||||
ese
|
||||
eso
|
||||
ante
|
||||
ellos
|
||||
e
|
||||
esto
|
||||
mí
|
||||
antes
|
||||
algunos
|
||||
qué
|
||||
unos
|
||||
yo
|
||||
otro
|
||||
otras
|
||||
otra
|
||||
él
|
||||
tanto
|
||||
esa
|
||||
estos
|
||||
mucho
|
||||
quienes
|
||||
nada
|
||||
muchos
|
||||
cual
|
||||
poco
|
||||
ella
|
||||
estar
|
||||
estas
|
||||
algunas
|
||||
algo
|
||||
nosotros
|
||||
mi
|
||||
mis
|
||||
tú
|
||||
te
|
||||
ti
|
||||
tu
|
||||
tus
|
||||
ellas
|
||||
nosotras
|
||||
vosostros
|
||||
vosostras
|
||||
os
|
||||
mío
|
||||
mía
|
||||
míos
|
||||
mías
|
||||
tuyo
|
||||
tuya
|
||||
tuyos
|
||||
tuyas
|
||||
suyo
|
||||
suya
|
||||
suyos
|
||||
suyas
|
||||
nuestro
|
||||
nuestra
|
||||
nuestros
|
||||
nuestras
|
||||
vuestro
|
||||
vuestra
|
||||
vuestros
|
||||
vuestras
|
||||
esos
|
||||
esas
|
||||
estoy
|
||||
estás
|
||||
está
|
||||
estamos
|
||||
estáis
|
||||
están
|
||||
esté
|
||||
estés
|
||||
estemos
|
||||
estéis
|
||||
estén
|
||||
estaré
|
||||
estarás
|
||||
estará
|
||||
estaremos
|
||||
estaréis
|
||||
estarán
|
||||
estaría
|
||||
estarías
|
||||
estaríamos
|
||||
estaríais
|
||||
estarían
|
||||
estaba
|
||||
estabas
|
||||
estábamos
|
||||
estabais
|
||||
estaban
|
||||
estuve
|
||||
estuviste
|
||||
estuvo
|
||||
estuvimos
|
||||
estuvisteis
|
||||
estuvieron
|
||||
estuviera
|
||||
estuvieras
|
||||
estuviéramos
|
||||
estuvierais
|
||||
estuvieran
|
||||
estuviese
|
||||
estuvieses
|
||||
estuviésemos
|
||||
estuvieseis
|
||||
estuviesen
|
||||
estando
|
||||
estado
|
||||
estada
|
||||
estados
|
||||
estadas
|
||||
estad
|
||||
he
|
||||
has
|
||||
ha
|
||||
hemos
|
||||
habéis
|
||||
han
|
||||
haya
|
||||
hayas
|
||||
hayamos
|
||||
hayáis
|
||||
hayan
|
||||
habré
|
||||
habrás
|
||||
habrá
|
||||
habremos
|
||||
habréis
|
||||
habrán
|
||||
habría
|
||||
habrías
|
||||
habríamos
|
||||
habríais
|
||||
habrían
|
||||
había
|
||||
habías
|
||||
habíamos
|
||||
habíais
|
||||
habían
|
||||
hube
|
||||
hubiste
|
||||
hubo
|
||||
hubimos
|
||||
hubisteis
|
||||
hubieron
|
||||
hubiera
|
||||
hubieras
|
||||
hubiéramos
|
||||
hubierais
|
||||
hubieran
|
||||
hubiese
|
||||
hubieses
|
||||
hubiésemos
|
||||
hubieseis
|
||||
hubiesen
|
||||
habiendo
|
||||
habido
|
||||
habida
|
||||
habidos
|
||||
habidas
|
||||
soy
|
||||
eres
|
||||
es
|
||||
somos
|
||||
sois
|
||||
son
|
||||
sea
|
||||
seas
|
||||
seamos
|
||||
seáis
|
||||
sean
|
||||
seré
|
||||
serás
|
||||
será
|
||||
seremos
|
||||
seréis
|
||||
serán
|
||||
sería
|
||||
serías
|
||||
seríamos
|
||||
seríais
|
||||
serían
|
||||
era
|
||||
eras
|
||||
éramos
|
||||
erais
|
||||
eran
|
||||
fui
|
||||
fuiste
|
||||
fue
|
||||
fuimos
|
||||
fuisteis
|
||||
fueron
|
||||
fuera
|
||||
fueras
|
||||
fuéramos
|
||||
fuerais
|
||||
fueran
|
||||
fuese
|
||||
fueses
|
||||
fuésemos
|
||||
fueseis
|
||||
fuesen
|
||||
sintiendo
|
||||
sentido
|
||||
sentida
|
||||
sentidos
|
||||
sentidas
|
||||
siente
|
||||
sentid
|
||||
tengo
|
||||
tienes
|
||||
tiene
|
||||
tenemos
|
||||
tenéis
|
||||
tienen
|
||||
tenga
|
||||
tengas
|
||||
tengamos
|
||||
tengáis
|
||||
tengan
|
||||
tendré
|
||||
tendrás
|
||||
tendrá
|
||||
tendremos
|
||||
tendréis
|
||||
tendrán
|
||||
tendría
|
||||
tendrías
|
||||
tendríamos
|
||||
tendríais
|
||||
tendrían
|
||||
tenía
|
||||
tenías
|
||||
teníamos
|
||||
teníais
|
||||
tenían
|
||||
tuve
|
||||
tuviste
|
||||
tuvo
|
||||
tuvimos
|
||||
tuvisteis
|
||||
tuvieron
|
||||
tuviera
|
||||
tuvieras
|
||||
tuviéramos
|
||||
tuvierais
|
||||
tuvieran
|
||||
tuviese
|
||||
tuvieses
|
||||
tuviésemos
|
||||
tuvieseis
|
||||
tuviesen
|
||||
teniendo
|
||||
tenido
|
||||
tenida
|
||||
tenidos
|
||||
tenidas
|
||||
tened
|
||||
|
||||
Executable
+67
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Directory required as first argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DIR="$1"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Acoustic Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
acoustic_output="${DIR}/acoustic_model"
|
||||
|
||||
if [[ ! -d "${acoustic_output}" ]]; then
|
||||
echo "Missing acoustic model"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# G2P
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
g2p_output="${DIR}/g2p.fst"
|
||||
|
||||
if [[ ! -s "${g2p_output}" ]]; then
|
||||
echo "Missing g2p model"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Dictionary
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
dict_output="${DIR}/base_dictionary.txt"
|
||||
|
||||
if [[ ! -s "${dict_output}" ]]; then
|
||||
echo "Missing base dictionary"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Language Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
lm_output="${DIR}/base_language_model.txt"
|
||||
|
||||
if [[ ! -s "${lm_output}" ]]; then
|
||||
echo "Missing base language model"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Flair Embeddings
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
flair_dir="${DIR}/flair/cache/embeddings"
|
||||
flair_files=("lm-fr-charlm-forward.pt" "lm-fr-charlm-backward.pt")
|
||||
for file_name in "${flair_files[@]}"; do
|
||||
file_output="${flair_dir}/${file_name}"
|
||||
if [[ ! -s "${file_output}" ]]; then
|
||||
echo "Missing flair embedding (${file_name})"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
Executable
+119
@@ -0,0 +1,119 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Directory required as first argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DIR="$1"
|
||||
download_dir="${DIR}/download"
|
||||
|
||||
if [[ "$2" = "--delete" ]]; then
|
||||
rm -rf "${download_dir}"
|
||||
fi
|
||||
|
||||
mkdir -p "${download_dir}"
|
||||
|
||||
echo "Downloading French (fr) profile (sphinx)"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Acoustic Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
acoustic_url='https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-fr/cmusphinx-fr-5.2.tar.gz'
|
||||
acoustic_file="${download_dir}/cmusphinx-fr-5.2.tar.gz"
|
||||
acoustic_output="${DIR}/acoustic_model"
|
||||
|
||||
if [[ ! -s "${acoustic_file}" ]]; then
|
||||
echo "Downloading acoustic model (${acoustic_url})"
|
||||
curl -sSfL -o "${acoustic_file}" "${acoustic_url}"
|
||||
fi
|
||||
|
||||
echo "Extracting acoustic model (${acoustic_file})"
|
||||
rm -rf "${acoustic_output}"
|
||||
tar -C "${DIR}" -xf "${acoustic_file}" && mv "${DIR}/cmusphinx-fr-5.2" "${acoustic_output}"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# G2P
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
g2p_url='https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-fr/fr-g2p.tar.gz'
|
||||
g2p_file="${download_dir}/fr-g2p.tar.gz"
|
||||
g2p_output="${DIR}/g2p.fst"
|
||||
|
||||
if [[ ! -s "${g2p_file}" ]]; then
|
||||
echo "Downloading g2p model (${g2p_url})"
|
||||
curl -sSfL -o "${g2p_file}" "${g2p_url}"
|
||||
fi
|
||||
|
||||
echo "Extracting g2p model (${g2p_file})"
|
||||
tar --to-stdout -xzf "${g2p_file}" 'g2p.fst' > "${g2p_output}" || exit 1
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Dictionary
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
dict_output="${DIR}/base_dictionary.txt"
|
||||
echo "Extracting dictionary (${g2p_file})"
|
||||
tar --to-stdout -xzf "${g2p_file}" 'base_dictionary.txt' > "${dict_output}" || exit 1
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Language Model
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
lm_url='https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-fr/fr-small.lm.gz'
|
||||
lm_file="${download_dir}/fr-small.lm.gz"
|
||||
lm_output="${DIR}/base_language_model.txt"
|
||||
|
||||
if [[ ! -s "${lm_file}" ]]; then
|
||||
echo "Downloading language model (${lm_url})"
|
||||
curl -sSfL -o "${lm_file}" "${lm_url}"
|
||||
fi
|
||||
|
||||
echo "Extracting language model (${lm_file})"
|
||||
zcat "${lm_file}" > "${lm_output}" || exit 1
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Snowboy
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
snowboy_models=("snowboy.umdl" "computer.umdl")
|
||||
for model_name in "${snowboy_models[@]}"; do
|
||||
model_output="${DIR}/${model_name}"
|
||||
if [[ ! -s "${model_output}" ]]; then
|
||||
model_url="https://github.com/Kitt-AI/snowboy/raw/master/resources/models/${model_name}"
|
||||
echo "Downloading ${model_output} (${model_url})"
|
||||
curl -sSfL -o "${model_output}" "${model_url}"
|
||||
fi
|
||||
done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Mycroft Precise
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
precise_files=("hey-mycroft-2.pb" "hey-mycroft-2.pb.params")
|
||||
for file_name in "${precise_files[@]}"; do
|
||||
file_output="${DIR}/${file_name}"
|
||||
if [[ ! -s "${file_output}" ]]; then
|
||||
file_url="https://github.com/MycroftAI/precise-data/raw/models/${file_name}"
|
||||
echo "Downloading ${file_output} (${file_url})"
|
||||
curl -sSfL -o "${file_output}" "${file_url}"
|
||||
fi
|
||||
done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Flair Embeddings
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
flair_dir="${DIR}/flair/cache/embeddings"
|
||||
mkdir -p "${flair_dir}"
|
||||
flair_files=("lm-fr-charlm-forward.pt" "lm-fr-charlm-backward.pt")
|
||||
for file_name in "${flair_files[@]}"; do
|
||||
file_output="${flair_dir}/${file_name}"
|
||||
if [[ ! -s "${file_output}" ]]; then
|
||||
file_url="https://github.com/synesthesiam/rhasspy-profiles/releases/download/v1.0-fr/${file_name}"
|
||||
echo "Downloading ${file_output} (${file_url})"
|
||||
curl -sSfL -o "${file_output}" "${file_url}"
|
||||
fi
|
||||
done
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user