Using mycroft/mimic3 instead of mycroft-mimic3-tts
This commit is contained in:
parent
4eb564c1bc
commit
1b68bc066b
10 changed files with 26 additions and 23 deletions
|
|
@ -58,7 +58,7 @@ RUN --mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
|
||||||
./install.sh
|
./install.sh
|
||||||
|
|
||||||
# Download default voice
|
# Download default voice
|
||||||
COPY voices/ /root/.local/share/mycroft-mimic3-tts/voices/
|
COPY voices/ /root/.local/share/mycroft/mimic3/voices/
|
||||||
RUN .venv/bin/mimic3-download 'en_UK/apope_low'
|
RUN .venv/bin/mimic3-download 'en_UK/apope_low'
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
@ -90,7 +90,7 @@ RUN useradd -ms /bin/bash mimic3
|
||||||
COPY --from=build /home/mimic3/app/ ./
|
COPY --from=build /home/mimic3/app/ ./
|
||||||
|
|
||||||
# Copy pre-downloaded voice(s)
|
# Copy pre-downloaded voice(s)
|
||||||
COPY --from=build /root/.local/share/mycroft-mimic3-tts/voices/ /usr/share/mycroft-mimic3-tts/voices/
|
COPY --from=build /root/.local/share/mycroft/mimic3/voices/ /usr/share/mycroft/mimic3/voices/
|
||||||
|
|
||||||
# Run test
|
# Run test
|
||||||
COPY tests/* ./tests/
|
COPY tests/* ./tests/
|
||||||
|
|
|
||||||
|
|
@ -124,11 +124,11 @@ RUN mkdir -p "${package_dir}/DEBIAN" && \
|
||||||
envsubst \
|
envsubst \
|
||||||
< "debian/control.in.${TARGETARCH}${TARGETVARIANT}" \
|
< "debian/control.in.${TARGETARCH}${TARGETVARIANT}" \
|
||||||
> "${package_dir}/DEBIAN/control" && \
|
> "${package_dir}/DEBIAN/control" && \
|
||||||
mkdir -p "${package_dir}/usr/lib/mycroft-mimic3-tts" && \
|
mkdir -p "${package_dir}/usr/lib/mycroft/mimic3" && \
|
||||||
rsync -av "dist/mimic3/" "${package_dir}/usr/lib/mycroft-mimic3-tts/" && \
|
rsync -av "dist/mimic3/" "${package_dir}/usr/lib/mycroft/mimic3/" && \
|
||||||
mkdir -p "${package_dir}/usr/bin/" && \
|
mkdir -p "${package_dir}/usr/bin/" && \
|
||||||
rsync -av "debian/bin/" "${package_dir}/usr/bin/" && \
|
rsync -av "debian/bin/" "${package_dir}/usr/bin/" && \
|
||||||
export dest_voice_dir="${package_dir}/usr/share/mycroft-mimic3-tts/voices/en_UK/apope_low" && \
|
export dest_voice_dir="${package_dir}/usr/share/mycroft/mimic3/voices/en_UK/apope_low" && \
|
||||||
mkdir -p "${dest_voice_dir}" && \
|
mkdir -p "${dest_voice_dir}" && \
|
||||||
rsync -av "voices/en_UK/apope_low/" "${dest_voice_dir}/" && \
|
rsync -av "voices/en_UK/apope_low/" "${dest_voice_dir}/" && \
|
||||||
cd /package && \
|
cd /package && \
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ RUN --mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
|
||||||
mycroft-mimic3-tts
|
mycroft-mimic3-tts
|
||||||
|
|
||||||
# Download default voice
|
# Download default voice
|
||||||
COPY voices/ /root/.local/share/mycroft-mimic3-tts/voices/
|
COPY voices/ /root/.local/share/mycroft/mimic3/voices/
|
||||||
RUN .venv/bin/mimic3-download 'en_UK/apope_low'
|
RUN .venv/bin/mimic3-download 'en_UK/apope_low'
|
||||||
|
|
||||||
# Run test
|
# Run test
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,9 @@ RUN sed -i 's/onnxruntime/onnxruntime-gpu/' mimic3-tts/requirements.txt
|
||||||
RUN --mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
|
RUN --mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
|
||||||
./install.sh
|
./install.sh
|
||||||
|
|
||||||
|
# Copy default voice
|
||||||
|
COPY voices/ /usr/local/share/mycroft/mimic3/voices/
|
||||||
|
|
||||||
RUN useradd -ms /bin/bash mimic3
|
RUN useradd -ms /bin/bash mimic3
|
||||||
|
|
||||||
USER mimic3
|
USER mimic3
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ RUN --mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
|
||||||
mycroft-plugin-tts-mimic3
|
mycroft-plugin-tts-mimic3
|
||||||
|
|
||||||
# Download default voice
|
# Download default voice
|
||||||
COPY voices/ /root/.local/share/mycroft-mimic3-tts/voices/
|
COPY voices/ /root/.local/share/mycroft/mimic3/voices/
|
||||||
RUN mycroft-core/.venv/bin/mimic3-download 'en_UK/apope_low'
|
RUN mycroft-core/.venv/bin/mimic3-download 'en_UK/apope_low'
|
||||||
|
|
||||||
# Enable plugin
|
# Enable plugin
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ RUN --mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
|
||||||
./install.sh
|
./install.sh
|
||||||
|
|
||||||
# Download default voice
|
# Download default voice
|
||||||
COPY voices/ /root/.local/share/mycroft-mimic3-tts/voices/
|
COPY voices/ /root/.local/share/mycroft/mimic3/voices/
|
||||||
RUN .venv/bin/mimic3-download 'en_UK/apope_low'
|
RUN .venv/bin/mimic3-download 'en_UK/apope_low'
|
||||||
|
|
||||||
# Generate sample
|
# Generate sample
|
||||||
|
|
|
||||||
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
|
|
@ -18,7 +18,7 @@
|
||||||
// Jenkins pipeline for building Mimic 3 artifacts.
|
// Jenkins pipeline for building Mimic 3 artifacts.
|
||||||
//
|
//
|
||||||
// Requires Docker buildx: https://docs.docker.com/buildx/working-with-buildx/
|
// Requires Docker buildx: https://docs.docker.com/buildx/working-with-buildx/
|
||||||
// Assumes the en_UK/apope_low voice is in /home/jenkins/.local/share/mycroft-mimic3-tts/voices
|
// Assumes the en_UK/apope_low voice is in /home/jenkins/.local/share/mycroft/mimic3/voices
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
@ -27,7 +27,7 @@ pipeline {
|
||||||
DOCKER_BUILDKIT = '1'
|
DOCKER_BUILDKIT = '1'
|
||||||
DOCKER_PLATFORM = 'linux/amd64,linux/arm64,linux/arm/v7'
|
DOCKER_PLATFORM = 'linux/amd64,linux/arm64,linux/arm/v7'
|
||||||
DEFAULT_VOICE = 'en_UK/apope_low'
|
DEFAULT_VOICE = 'en_UK/apope_low'
|
||||||
DEFAULT_VOICE_PATH = '/home/jenkins/.local/share/mycroft-mimic3-tts/voices'
|
DEFAULT_VOICE_PATH = '/home/jenkins/.local/share/mycroft/mimic3/voices'
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
|
|
|
||||||
16
README.md
16
README.md
|
|
@ -103,28 +103,28 @@ Or you can manually run the web server with:
|
||||||
docker run \
|
docker run \
|
||||||
-it \
|
-it \
|
||||||
-p 59125:59125 \
|
-p 59125:59125 \
|
||||||
-v "${HOME}/.local/share/mimic3:/home/mimic3/.local/share/mimic3" \
|
-v "${HOME}/.local/share/mycroft/mimic3:/home/mimic3/.local/share/mycroft/mimic3" \
|
||||||
'mycroftai/mimic3'
|
'mycroftai/mimic3'
|
||||||
```
|
```
|
||||||
|
|
||||||
Voices will be automatically downloaded to `${HOME}/.local/share/mycroft-mimic3-tts/voices`
|
Voices will be automatically downloaded to `${HOME}/.local/share/mycroft/mimic3/voices`
|
||||||
|
|
||||||
|
|
||||||
### Debian Package
|
### Debian Package
|
||||||
|
|
||||||
Grab the Debian package from the [latest release](https://github.com/mycroftAI/mimic3/releases) for your platform:
|
Grab the Debian package from the [latest release](https://github.com/mycroftAI/mimic3/releases) for your platform:
|
||||||
|
|
||||||
* `mimic3-tts_<version>_amd64.deb`
|
* `mycroft-mimic3-tts_<version>_amd64.deb`
|
||||||
* For desktops and laptops (`x86_64` CPUs)
|
* For desktops and laptops (`x86_64` CPUs)
|
||||||
* `mimic3-tts_<version>_arm64.deb`
|
* `mycroft-mimic3-tts_<version>_arm64.deb`
|
||||||
* For Raspberry 3/4 and Zero 2 with [64-bit Pi OS](https://www.raspberrypi.com/news/raspberry-pi-os-64-bit/)
|
* For Raspberry 3/4 and Zero 2 with [64-bit Pi OS](https://www.raspberrypi.com/news/raspberry-pi-os-64-bit/)
|
||||||
* `mimic3-tts_<version>_armhf.deb`
|
* `mycroft-mimic3-tts_<version>_armhf.deb`
|
||||||
* For Raspberry Pi 1/2/3/4 and Zero 2 with 32-bit Pi OS
|
* For Raspberry Pi 1/2/3/4 and Zero 2 with 32-bit Pi OS
|
||||||
|
|
||||||
Once downloaded, install the package with (note the `./`):
|
Once downloaded, install the package with (note the `./`):
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
sudo apt install ./mimic3-tts_<version>_<platform>.deb
|
sudo apt install ./mycroft-mimic3-tts_<version>_<platform>.deb
|
||||||
```
|
```
|
||||||
|
|
||||||
Once installed, the following commands will be available in `/usr/bin`:
|
Once installed, the following commands will be available in `/usr/bin`:
|
||||||
|
|
@ -200,7 +200,7 @@ Mimic 3 references voices with the format:
|
||||||
For example, the default [Alan Pope](https://popey.me/) voice key is `en_UK/apope_low`.
|
For example, the default [Alan Pope](https://popey.me/) voice key is `en_UK/apope_low`.
|
||||||
The [CMU Arctic voice](https://github.com/MycroftAI/mimic3-voices/tree/master/voices/en_US/cmu-arctic_low) contains multiple speakers, with a commonly used voice being `en_US/cmu-arctic_low#slt`.
|
The [CMU Arctic voice](https://github.com/MycroftAI/mimic3-voices/tree/master/voices/en_US/cmu-arctic_low) contains multiple speakers, with a commonly used voice being `en_US/cmu-arctic_low#slt`.
|
||||||
|
|
||||||
Voices are automatically downloaded from [Github](https://github.com/MycroftAI/mimic3-voices) and stored in `${HOME}/.local/share/mimic3` (technically `${XDG_DATA_HOME}/mimic3`). You can also [manually download them](#downloading-voices).
|
Voices are automatically downloaded from [Github](https://github.com/MycroftAI/mimic3-voices) and stored in `${HOME}/.local/share/mycroft/mimic3` (technically `${XDG_DATA_HOME}/mycroft/mimic3`). You can also [manually download them](#downloading-voices).
|
||||||
|
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
|
|
@ -229,7 +229,7 @@ For example:
|
||||||
mimic3-download 'en_US/*'
|
mimic3-download 'en_US/*'
|
||||||
```
|
```
|
||||||
|
|
||||||
will download all U.S. English voices to `${HOME}/.local/share/mimic3`.
|
will download all U.S. English voices to `${HOME}/.local/share/mycroft/mimic3/voices`.
|
||||||
|
|
||||||
See `mimic3-download --help` for more options.
|
See `mimic3-download --help` for more options.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ DEFAULT_LANGUAGE = "en_UK"
|
||||||
DEFAULT_VOICES_URL_FORMAT = (
|
DEFAULT_VOICES_URL_FORMAT = (
|
||||||
"https://github.com/MycroftAI/mimic3-voices/raw/master/voices/{lang}/{name}"
|
"https://github.com/MycroftAI/mimic3-voices/raw/master/voices/{lang}/{name}"
|
||||||
)
|
)
|
||||||
DEFAULT_VOICES_DOWNLOAD_DIR = Path(XDG().XDG_DATA_HOME) / "mimic3" / "voices"
|
DEFAULT_VOICES_DOWNLOAD_DIR = Path(XDG().XDG_DATA_HOME) / "mycroft" / "mimic3" / "voices"
|
||||||
|
|
||||||
DEFAULT_VOLUME = 100.0
|
DEFAULT_VOLUME = 100.0
|
||||||
DEFAULT_RATE = 1.0
|
DEFAULT_RATE = 1.0
|
||||||
|
|
|
||||||
|
|
@ -160,12 +160,12 @@ class Mimic3TextToSpeechSystem(TextToSpeechSystem):
|
||||||
"""Get list of directories to search for voices by default.
|
"""Get list of directories to search for voices by default.
|
||||||
|
|
||||||
On Linux, this is typically:
|
On Linux, this is typically:
|
||||||
- $HOME/.local/share/mycroft-mimic3-tts/voices
|
- $HOME/.local/share/mycroft/mimic3/voices
|
||||||
- /usr/local/share/mycroft-mimic3-tts/voices
|
- /usr/local/share/mycroft/mimic3/voices
|
||||||
- /usr/share/mycroft-mimic3-tts/voices
|
- /usr/share/mycroft/mimic3/voices
|
||||||
"""
|
"""
|
||||||
return [
|
return [
|
||||||
Path(d) / "mycroft-mimic3-tts" / "voices"
|
Path(d) / "mycroft" / "mimic3" / "voices"
|
||||||
for d in XDG().XDG_DATA_DIRS.split(":")
|
for d in XDG().XDG_DATA_DIRS.split(":")
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue