Wednesday, October 12, 2022
HomeOperating SystemSetting Up Mimic 3 - Alan Pope's weblog

Setting Up Mimic 3 – Alan Pope’s weblog


Yesterday I blogged about utilizing Mycroft AI’s Mimic 3, an Open Supply Textual content-to-Speech engine I used to generate audio of a weblog put up.

One factor I didn’t point out, which may be helpful, is the best way to setup Mimic 3. It’s fairly simple, so right here we go.

The Mimic 3 builders have some releases over on their mimic3 GitHub repo, which embody deb packages. If you need the simple approach, perhaps use these, however I needed to attempt the newest and best, so I grabbed the newest grasp department.

Pre-requisites

On my laptop computer I’m utilizing Kubuntu Kinetic Kudu, a growth launch of Kubuntu which is able to turn out to be 22.10 someday quickly. Mimic 3 setup makes use of a Python venv (digital setting), so I wanted to put in one further package deal.

$ sudo apt set up python3.10-venv

That package deal will virtually definitely differ in your system for those who’re not on Kubuntu Kinetic Kudu (22.10).

Get the code

I grabbed the code from GitHub utilizing a git clone, however there’s additionally a tarball you can seize, and unpack.

$ mkdir ~/Supply/mycroftai
$ cd mycroftai
$ git clone https://github.com/MycroftAI/mimic3

Set up Mimic 3

Putting in mimic is simplified through one command.

$ cd mimic3
$ ./set up.sh

The output from that appears like this:

Creating digital setting at /dwelling/alan/Supply/mycroftai/mimic3/.venv (Python 3.10.7)
Putting in Python dependencies
Wanting in hyperlinks: /dwelling/alan/Supply/mycroftai/mimic3/wheels, https://synesthesiam.github.io/prebuilt-apps/
Requirement already glad: pip in ./.venv/lib/python3.10/site-packages (22.2)
Gathering pip
  Downloading pip-22.2.2-py3-none-any.whl (2.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 5.7 MB/s eta 0:00:00
Putting in collected packages: pip
  Trying uninstall: pip
    Discovered present set up: pip 22.2
    Uninstalling pip-22.2:
      Efficiently uninstalled pip-22.2
Efficiently put in pip-22.2.2
⋮

It ends like this:

⋮
Efficiently constructed espeak-phonemizer gruut phonemes2ids gruut-ipa gruut_lang_de gruut_lang_en gruut_lang_es gruut_lang_fa gruut_lang_fr gruut_lang_it gruut_lang_nl gruut_lang_ru gruut_lang_sw nltk unicodecsv docopt libwapiti editdistance
Putting in collected packages: xdgenvpy, unicodecsv, pytz, python-crfsuite, phonemes2ids, mypy-extensions, munkres, mpmath, gruut_lang_sw, gruut_lang_ru, gruut_lang_nl, gruut_lang_it, gruut_lang_fr, gruut_lang_fa, gruut_lang_es, gruut_lang_en, gruut_lang_de, flatbuffers, espeak-phonemizer, docopt, urllib3, tzdata, typing-extensions, tqdm, toml, sympy, six, regex, PyYaml, pyparsing, protobuf, precedence, numpy, num2words, networkx, markupsafe, marisa-trie, itsdangerous, idna, hyperframe, humanfriendly, hpack, h11, gruut-ipa, editdistance, click on, charset-normalizer, certifi, blinker, Babel, aiofiles, wsproto, werkzeug, typing-inspect, requests, pytz-deprecation-shim, python-dateutil, panphon, packaging, nltk, libwapiti, jsonlines, jinja2, h2, coloredlogs, tzlocal, swagger-ui-py, onnxruntime, marshmallow, hypercorn, hazm, epitran, quart, marshmallow-enum, dateparser, quart-cors, gruut, dataclasses-json, mycroft-mimic3-tts
  Working setup.py develop for mycroft-mimic3-tts
Efficiently put in Babel-2.10.3 PyYaml-6.0 aiofiles-22.1.0 blinker-1.5 certifi-2022.9.24 charset-normalizer-2.1.1 click-8.1.3 coloredlogs-15.0.1 dataclasses-json-0.5.7 dateparser-1.1.1 docopt-0.6.2 editdistance-0.6.0 epitran-1.17 espeak-phonemizer-1.1.0 flatbuffers-22.9.24 gruut-2.3.4 gruut-ipa-0.13.0 gruut_lang_de-2.0.0 gruut_lang_en-2.0.0 gruut_lang_es-2.0.0 gruut_lang_fa-2.0.0 gruut_lang_fr-2.0.2 gruut_lang_it-2.0.0 gruut_lang_nl-2.0.2 gruut_lang_ru-2.0.0 gruut_lang_sw-2.0.0 h11-0.14.0 h2-4.1.0 hazm-0.7.0 hpack-4.0.0 humanfriendly-10.0 hypercorn-0.14.3 hyperframe-6.0.1 idna-3.4 itsdangerous-2.1.2 jinja2-3.1.2 jsonlines-1.2.0 libwapiti-0.2.1 marisa-trie-0.7.7 markupsafe-2.1.1 marshmallow-3.18.0 marshmallow-enum-1.5.1 mpmath-1.2.1 munkres-1.1.4 mycroft-mimic3-tts-0.2.3 mypy-extensions-0.4.3 networkx-2.8.7 nltk-3.3 num2words-0.6.0 numpy-1.23.3 onnxruntime-1.12.1 packaging-21.3 panphon-0.20.0 phonemes2ids-1.2.2 priority-2.0.0 protobuf-4.21.7 pyparsing-3.0.9 python-crfsuite-0.9.8 python-dateutil-2.8.2 pytz-2022.4 pytz-deprecation-shim-0.1.0.post0 quart-0.18.3 quart-cors-0.5.0 regex-2022.3.2 requests-2.28.1 six-1.16.0 swagger-ui-py-21.12.8 sympy-1.11.1 toml-0.10.2 tqdm-4.64.1 typing-extensions-4.4.0 typing-inspect-0.8.0 tzdata-2022.4 tzlocal-4.2 unicodecsv-0.14.1 urllib3-1.26.12 werkzeug-2.2.2 wsproto-1.2.0 xdgenvpy-2.3.5
~/Supply/mycroftai/mimic3
OK

Begin Mimic 3

First enter the digital setting:

$ supply .venv/bin/activate

Launch the Mimic 3 server:

The output appears to be like a bit like this:

INFO:mimic3_http.__main__:Beginning net server
[2022-10-11 09:01:07 +0100] [441199] [INFO] Working on http://0.0.0.0:59125 (CTRL + C to stop)
INFO:hypercorn.error:Working on http://0.0.0.0:59125 (CTRL + C to stop)

Use Mimic 3

Level your browser on the URL displayed. From there, you’ll be able to choose a language, and voice, sort some textual content and mash the “Communicate” button.

You’ll see this in your terminal, as Mimic 3 downloads the recordsdata for no matter language and voice you chose.

ALIASES: 100%|█████████████████████████████████████████████████| 27.0/27.0 [00:00<00:00, 101kB/s]
LICENSE: 100%|█████████████████████████████████████████████████| 46.0/46.0 [00:00<00:00, 244kB/s]
README.md: 100%|█████████████████████████████████████████████████| 8.52k/8.52k [00:00<00:00, 9.15MB/s]
README.md.in: 100%|█████████████████████████████████████████████████| 155/155 [00:00<00:00, 652kB/s]
SOURCE: 100%|█████████████████████████████████████████████████| 18.0/18.0 [00:00<00:00, 94.0kB/s]
VERSION: 100%|█████████████████████████████████████████████████| 6.00/6.00 [00:00<00:00, 10.5kB/s]
config.json: 100%|█████████████████████████████████████████████████| 3.41k/3.41k [00:00<00:00, 5.63MB/s]
generator.onnx: 100%|█████████████████████████████████████████████████| 59.9M/59.9M [00:05<00:00, 10.6MB/s]
phoneme_map.txt: 100%|█████████████████████████████████████████████████| 15.0/15.0 [00:00<00:00, 68.0kB/s]
phonemes.txt: 100%|█████████████████████████████████████████████████| 263/263 [00:00<00:00, 442kB/s]
INFO:mimic3_tts.tts:Loaded voice from /dwelling/alan/.native/share/mycroft/mimic3/voices/en_UK/apope_low

Then you definitely’ll get an audio file embedded within the web page which may be performed immediately, or downloaded as a WAV file.

The one slight fly within the ointment is there’s at the moment a bug the place for those who hit the /api/voices endpoint, it breaks Mimic 3. So don’t do this, or contribute a repair to the bug as a substitute 😉

Aside from that, it’s fairly neat and fast to get setup and operating.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments