From f05c40600114fa7632f830a08490d1d861443c60 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Wed, 30 Mar 2022 14:45:33 -0400 Subject: [PATCH] Search for voices in mimic3/voices --- Dockerfile | 3 ++ Makefile | 5 +- mimic3-http/README.md | 7 ++- mimic3-tts/mimic3_tts/const.py | 4 +- mimic3-tts/mimic3_tts/tts.py | 8 ++-- mimic3-tts/mimic3_tts/voices.json | 77 +++++-------------------------- 6 files changed, 30 insertions(+), 74 deletions(-) diff --git a/Dockerfile b/Dockerfile index dd0fd99..f5963f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,9 @@ # ----------------------------------------------------------------------------- # Dockerfile for Mimic 3 (https://github.com/MycroftAI/mimic3) # +# Runs an HTTP server on port 59125. +# See scripts in docker/ directory of this repository. +# # Requires Docker buildx: https://docs.docker.com/buildx/working-with-buildx/ # ----------------------------------------------------------------------------- diff --git a/Makefile b/Makefile index d4a2871..c16d751 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # -.PHONY: dist docker +.PHONY: dist install docker dist: cd opentts-abc && python3 setup.py sdist @@ -24,5 +24,8 @@ dist: cp mimic3-tts/dist/mimic3_tts-*.tar.gz dist/ cp mimic3-http/dist/mimic3_http-*.tar.gz dist/ +install: + ./install.sh + docker: docker buildx build . -f Dockerfile --tag mycroftai/mimic3 --load diff --git a/mimic3-http/README.md b/mimic3-http/README.md index b55ab29..c7c6d49 100644 --- a/mimic3-http/README.md +++ b/mimic3-http/README.md @@ -1,10 +1,13 @@ # Mimic 3 Web Server -## Server +## Installation + + +## Running the Server ``` sh ``` -## Client +## Running the Client diff --git a/mimic3-tts/mimic3_tts/const.py b/mimic3-tts/mimic3_tts/const.py index bf395ef..0319524 100644 --- a/mimic3-tts/mimic3_tts/const.py +++ b/mimic3-tts/mimic3_tts/const.py @@ -19,5 +19,5 @@ from xdgenvpy import XDG DEFAULT_VOICE = "en_US/vctk_low" DEFAULT_LANGUAGE = "en_US" -DEFAULT_VOICES_URL_FORMAT = "https://github.com/MycroftAI/mimic3-voices/raw/master/{lang}/{name}" -DEFAULT_VOICES_DOWNLOAD_DIR = Path(XDG().XDG_DATA_HOME) / "mimic3" +DEFAULT_VOICES_URL_FORMAT = "https://github.com/MycroftAI/mimic3-voices/raw/master/voices/{lang}/{name}" +DEFAULT_VOICES_DOWNLOAD_DIR = Path(XDG().XDG_DATA_HOME) / "mimic3" / "voices" diff --git a/mimic3-tts/mimic3_tts/tts.py b/mimic3-tts/mimic3_tts/tts.py index ed24b4e..2c02842 100644 --- a/mimic3-tts/mimic3_tts/tts.py +++ b/mimic3-tts/mimic3_tts/tts.py @@ -141,11 +141,11 @@ class Mimic3TextToSpeechSystem(TextToSpeechSystem): """Get list of directories to search for voices by default. On Linux, this is typically: - - $HOME/.local/share/mimic3 - - /usr/local/share/mimic3 - - /usr/share/mimic3 + - $HOME/.local/share/mimic3/voices + - /usr/local/share/mimic3/voices + - /usr/share/mimic3/voices """ - return [Path(d) / "mimic3" for d in XDG().XDG_DATA_DIRS.split(":")] + return [Path(d) / "mimic3" / "voices" for d in XDG().XDG_DATA_DIRS.split(":")] def get_voices(self) -> typing.Iterable[Voice]: """Returns an iterable of all available voices""" diff --git a/mimic3-tts/mimic3_tts/voices.json b/mimic3-tts/mimic3_tts/voices.json index 455a215..eb28112 100644 --- a/mimic3-tts/mimic3_tts/voices.json +++ b/mimic3-tts/mimic3_tts/voices.json @@ -536,32 +536,6 @@ "speakers": [], "properties": {} }, - "pt_BR/edresson_low": { - "files": { - "LICENSE": { - "size_bytes": 18652, - "sha256_sum": "cce5d01fa4a83b794271bd2c28cffdf99afd43c803e6ddefddae39b591ea7448" - }, - "SOURCE": { - "size_bytes": 50, - "sha256_sum": "1ba21abad312197fbe4c9c0d449e16bad57f4c2e3e8e37e31e2d50b413faab04" - }, - "config.json": { - "size_bytes": 3586, - "sha256_sum": "d19b81d56f90344e110426d5830e5b27a3af178bccd44dd6b072d811cdade750" - }, - "generator.onnx": { - "size_bytes": 62796055, - "sha256_sum": "142f4a8268549a8fa148066182e548335eb60826c751228f0c311e8d49d0d938" - }, - "phonemes.txt": { - "size_bytes": 282, - "sha256_sum": "270d2d069b677555c8d703afa3e3883e43e905e993ebb3e85f3481b60fe9f638" - } - }, - "speakers": [], - "properties": {} - }, "ru_RU/multi_low": { "files": { "config.json": { @@ -604,40 +578,6 @@ ], "properties": {} }, - "sv_SE/talesyntese_low": { - "files": { - "LICENSE": { - "size_bytes": 51, - "sha256_sum": "bd1a963f2c77481f0a658b5fa7fe77c2515e73be3972f1e991741b72f6fd7d31" - }, - "README.md": { - "size_bytes": 203, - "sha256_sum": "f574e3807bec86b91caa0d70b1ac8c4ef85ecc297afb49b62642f9944554cbaa" - }, - "SOURCE": { - "size_bytes": 63, - "sha256_sum": "295e2c2e47edb2f156c10808efb9439714d227c5b45b60a4f8ec3adc33451a6b" - }, - "config.json": { - "size_bytes": 3376, - "sha256_sum": "8e5a29c1a0ae655c9d0d56df025f22286e81ce323d1b68d07977b90bf61ee33e" - }, - "generator.onnx": { - "size_bytes": 62802967, - "sha256_sum": "bd9a50a8b0d35116c0d543681c2384bb738087ea771f9abee805feb53aa5f708" - }, - "phoneme_map.txt": { - "size_bytes": 15, - "sha256_sum": "4003f421fc91ed1d5a343442659db6cf9d58bd1c6d8d771abc1999cc24d7694d" - }, - "phonemes.txt": { - "size_bytes": 360, - "sha256_sum": "b4d2422bcc2b2f3ea739ce3f59019e499b966a74836aa54f6300921c4fc7ae76" - } - }, - "speakers": [], - "properties": {} - }, "sw/lanfrica_low": { "files": { "LICENSE": { @@ -656,10 +596,6 @@ "size_bytes": 62787607, "sha256_sum": "b470bf4b042ea96d2272162e9efaa8bd48bae4bc771d4a9996631f645e740e80" }, - "phoneme_map.txt": { - "size_bytes": 15, - "sha256_sum": "4003f421fc91ed1d5a343442659db6cf9d58bd1c6d8d771abc1999cc24d7694d" - }, "phonemes.txt": { "size_bytes": 245, "sha256_sum": "4784d6c095a3937b09a6f1fa292df160409033ec1d763d90d9b95ac5a42bf42d" @@ -697,9 +633,20 @@ "speaker_map.csv": { "size_bytes": 118, "sha256_sum": "f74765e11fca2ac205b2acb1213bdaa3bd3f6c9235ebcab5479160bfef1b7aa0" + }, + "speakers.txt": { + "size_bytes": 52, + "sha256_sum": "c1ba92bba7a9f7a058a2465c80682a25dace008d70dc8e54317801d389e01c1f" } }, - "speakers": [], + "speakers": [ + "obruchov", + "shepel", + "loboda", + "miskun", + "sumska", + "pysariev" + ], "properties": {} } } \ No newline at end of file