Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tts gibt nach der Installation nur Ungültiger Maschinenbefehl aus #59

Open
git2fa opened this issue Feb 14, 2024 · 10 comments
Open

tts gibt nach der Installation nur Ungültiger Maschinenbefehl aus #59

git2fa opened this issue Feb 14, 2024 · 10 comments

Comments

@git2fa
Copy link

git2fa commented Feb 14, 2024

Vielen Dank für Deine Arbeit und Dein Video!
https://www.youtube.com/watch?v=uyG1Sx7_3Yg

Die Installation endete mit

Installing collected packages: typing-extensions, pydantic-core, nvidia-nvjitlink-cu12, catalogue, annotated-types, zipp, srsly, pydantic, nvidia-cusparse-cu12, nvidia-cublas-cu12, numpy, murmurhash, mpmath, MarkupSafe, filelock, cymem, click, wasabi, tzlocal, typer, triton, tqdm, threadpoolctl, sympy, smart-open, setuptools, scipy, regex, pyyaml, pytz, pycparser, preshed, packaging, nvidia-nvtx-cu12, nvidia-nccl-cu12, nvidia-cusolver-cu12, nvidia-curand-cu12, nvidia-cufft-cu12, nvidia-cudnn-cu12, nvidia-cuda-runtime-cu12, nvidia-cuda-nvrtc-cu12, nvidia-cuda-cupti-cu12, llvmlite, joblib, Jinja2, importlib-metadata, fsspec, docopt, confection, cloudpathlib, blis, Werkzeug, weasel, torch, thinc, tf-keras-nightly, tensorboard-data-server, sudachipy, spacy-loggers, spacy-legacy, scikit-learn, python-crfsuite, protobuf, platformdirs, numba, num2words, multidict, markdown, langcodes, jsonlines, huggingface-hub, gruut-lang-en, gruut-ipa, grpcio, frozenlist, dateparser, cffi, Babel, absl-py, yarl, torchaudio, tokenizers, tensorboard, sudachidict-core, spacy, soxr, soundfile, safetensors, pynndescent, psutil, pooch, nltk, msgpack, lazy-loader, jamo, itsdangerous, importlib-resources, gruut-lang-fr, gruut-lang-es, gruut-lang-de, gruut, fonttools, einops, coqpit, contourpy, blinker, audioread, attrs, async-timeout, aiosignal, unidecode, umap-learn, transformers, trainer, pysbd, pypinyin, pandas, matplotlib, librosa, jieba, inflect, hangul-romanize, g2pkk, flask, encodec, cython, bnunicodenormalizer, bnnumerizer, bangla, anyascii, aiohttp, wheel, tts

Danach fehlte unter Debian 11 noch der Pfad, was jedoch mit
export PATH=~/.local/bin:$PATH
behoben werden konnte.

Dann allerdings funktioniert die Installation dennoch nicht:

$ tts --list_models
Ungültiger Maschinenbefehl

Was muß getan werden?

Noch eine weitere zusätzliche Frage:
Warum sind dermaßen riesige Downloads notwendig?
In ~/.local/lib/python3.9/site-packages findet sich

40K     ./SudachiPy-0.6.8.dist-info
56K     ./bitarray-2.8.2.dist-info
68K     ./srsly-2.4.8.dist-info
48K     ./inflect-7.0.0.dist-info
40K     ./soundfile-0.12.1.dist-info
40K     ./Markdown-3.5.2.dist-info
28K     ./murmurhash-1.0.10.dist-info
172K    ./platformdirs
28K     ./nvidia_nccl_cu12-2.19.3.dist-info
1,7M    ./werkzeug
652K    ./umap
64K     ./num2words-0.5.13.dist-info
84K     ./lazy_loader
207M    ./sudachidict_core
61M     ./pandas
72K     ./setuptools-69.1.0.dist-info
84K     ./nvidia_nvtx_cu12-12.1.105.dist-info
288K    ./scipy-1.11.4.dist-info
40K     ./librosa-0.10.0.dist-info
48K     ./mpmath-1.3.0.dist-info
588K    ./pooch
480K    ./pysbd
636K    ./functorch
32K     ./jamo-0.4.1.dist-info
5,1M    ./soxr
72K     ./benchmarks
152K    ./importlib_metadata
24M     ./fontTools
28K     ./trainer-0.0.36.dist-info
48K     ./gruut_ipa-0.13.0.dist-info
28K     ./async_timeout
16K     ./bangla
120K    ./pydantic-2.6.1.dist-info
36K     ./cymem-2.0.8.dist-info
40K     ./jsonlines
28K     ./click-8.1.7.dist-info
1,4M    ./espefuse
1,2M    ./bitarray
32K     ./werkzeug-3.0.1.dist-info
120K    ./Babel-2.14.0.dist-info
28K     ./preshed-3.0.9.dist-info
36K     ./coqpit-0.0.17.dist-info
28K     ./jieba-0.42.1.dist-info
20M     ./tensorboard_data_server
28K     ./PyYAML-6.0.1.dist-info
28M     ./gruut_lang_fr
224K    ./tests
37M     ./babel
676K    ./markdown
28K     ./bnnumerizer-0.0.2.dist-info
24K     ./tensorboard_data_server-0.7.2.dist-info
4,0M    ./thinc
32K     ./python_crfsuite-0.9.10.dist-info
88K     ./nvidia_cuda_cupti_cu12-12.1.105.dist-info
14M     ./grpc
36K     ./SudachiDict_core-20240109.dist-info
52K     ./annotated_types
44K     ./docopt-0.6.2.dist-info
7,2M    ./TTS
132K    ./audioread
72K     ./regex-2023.12.25.dist-info
944K    ./num2words
44K     ./dateparser_cli
48K     ./smart_open-6.4.0.dist-info
2,1M    ./joblib
448K    ./transformers-4.37.2.dist-info
264K    ./__pycache__
156K    ./espsecure
36K     ./cloudpathlib-0.16.0.dist-info
160K    ./numba-0.59.0.dist-info
28K     ./filelock-3.13.1.dist-info
92K     ./examples
28K     ./contourpy-1.2.0.dist-info
64K     ./grpcio-1.60.1.dist-info
32K     ./multidict-6.0.5.dist-info
220K    ./wasabi
84K     ./nvidia_cusolver_cu12-11.4.5.107.dist-info
48K     ./confection-0.1.4.dist-info
376K    ./cloudpathlib
44K     ./importlib_resources-6.1.1.dist-info
3,2M    ./torchgen
96K     ./markupsafe
44K     ./pypinyin-0.50.0.dist-info
36K     ./bangla-0.0.2.dist-info
70M     ./transformers
480K    ./tqdm
27M     ./numba
52K     ./torchaudio-2.2.0.dist-info
1,6M    ./torch-2.2.0.dist-info
100K    ./tensorboard-2.16.0.dist-info
9,4M    ./pypinyin
28K     ./flask-3.0.2.dist-info
28K     ./lazy_loader-0.3.dist-info
508K    ./wheel
3,0M    ./pydantic
56K     ./spacy_loggers-1.0.5.dist-info
488K    ./bitstring
36K     ./fsspec-2024.2.0.dist-info
38M     ./gruut_lang_en
364K    ./typer
36K     ./jsonlines-1.2.0.dist-info
444K    ./trainer
40K     ./einops-0.7.0.dist-info
4,5M    ./setuptools
56K     ./ecdsa-0.18.0.dist-info
32K     ./threadpoolctl-3.2.0.dist-info
228K    ./fonttools-4.48.1.dist-info
340K    ./einops
452K    ./weasel
76K     ./Cython-3.0.8.dist-info
32K     ./Jinja2-3.1.3.dist-info
104K    ./nltk-3.8.1.dist-info
112K    ./pyximport
32K     ./wheel-0.42.0.dist-info
3,7M    ./pycrfsuite
112K    ./TTS-0.22.0.dist-info
88K     ./filelock
36K     ./hangul_romanize
39M     ./jieba
160K    ./bnunicodenormalizer
460K    ./gruut_ipa
724K    ./flask
112K    ./itsdangerous
52K     ./psutil-5.9.8.dist-info
1,4M    ./pkg_resources
248K    ./confection
92K     ./nvidia_cuda_runtime_cu12-12.1.105.dist-info
88K     ./blinker
1,1M    ./pycparser
28K     ./pycparser-2.21.dist-info
80K     ./coqpit
35M     ./scipy.libs
3,1M    ./regex
1,1M    ./contourpy
36K     ./async_timeout-4.0.3.dist-info
156K    ./cymem
68K     ./anyascii-0.3.2.dist-info
5,0M    ./safetensors
108K    ./tzlocal
984K    ./jinja2
50M     ./sklearn
24K     ./gruut_lang_en-2.0.0.dist-info
38M     ./matplotlib
40K     ./annotated_types-0.6.0.dist-info
172K    ./matplotlib-3.8.2.dist-info
448K    ./pynndescent
48K     ./gruut-2.2.3.dist-info
172K    ./scikit_learn.libs
272K    ./pandas-1.5.3.dist-info
84K     ./nvidia_cusparse_cu12-12.1.0.106.dist-info
40K     ./weasel-0.3.4.dist-info
84K     ./nvidia_cublas_cu12-12.1.3.1.dist-info
44K     ./catalogue-2.0.10.dist-info
24K     ./gruut_lang_fr-2.0.2.dist-info
128K    ./tf_keras_nightly-2.16.0.dev2024021410.dist-info
20K     ./safetensors-0.4.2.dist-info
212K    ./inflect
56K     ./esptool-4.6.2.dist-info
404K    ./gruut
2,6M    ./huggingface_hub
1,3M    ./mpl_toolkits
32K     ./_distutils_hack
32K     ./blis-0.7.11.dist-info
60K     ./jamo
84K     ./nvidia_nvjitlink_cu12-12.3.101.dist-info
80K     ./Unidecode-1.3.8.dist-info
2,8G    ./nvidia
3,9M    ./mpmath
2,4M    ./anyascii
129M    ./gruut_lang_es
16K     ./_yaml
360K    ./smart_open
292K    ./spacy_legacy
32K     ./pydantic_core-2.16.2.dist-info
44K     ./bnunicodenormalizer-0.1.6.dist-info
372K    ./importlib_resources
308K    ./encodec
419M    ./triton
2,8M    ./pytz
144K    ./scikit_learn-1.4.0.dist-info
48K     ./reedsolo-1.7.0.dist-info
60K     ./soxr-0.3.7.dist-info
52K     ./zipp
36K     ./bnnumerizer
5,6M    ./pydantic_core
40K     ./pysbd-0.3.4.dist-info
40K     ./packaging-23.2.dist-info
36K     ./msgpack-1.0.7.dist-info
2,4M    ./msgpack
40K     ./aiohttp-3.9.3.dist-info
32K     ./cffi-1.16.0.dist-info
16M     ./tf_keras
60K     ./wasabi-1.1.2.dist-info
48K     ./umap_learn-0.5.5.dist-info
60K     ./huggingface_hub-0.20.3.dist-info
15M     ./Cython
2,7M    ./yaml
1,4M    ./fsspec
44K     ./frozenlist-1.4.1.dist-info
72M     ./gruut_lang_de
30M     ./blis
1,0M    ./yarl
780K    ./frozenlist
708K    ./cffi
1,2M    ./langcodes
84K     ./nvidia_cufft_cu12-11.0.2.54.dist-info
84K     ./nvidia_curand_cu12-10.3.2.106.dist-info
36K     ./platformdirs-4.2.0.dist-info
928K    ./absl
40K     ./spacy_legacy-3.0.12.dist-info
60K     ./attrs
32K     ./pynndescent-0.5.11.dist-info
20K     ./dateparser_data
28K     ./hangul_romanize-0.1.0.dist-info
3,6M    ./srsly
33M     ./numpy
36K     ./attrs-23.2.0.dist-info
464K    ./preshed
3,5M    ./torio
28K     ./MarkupSafe-2.1.5.dist-info
52K     ./llvmlite-0.42.0.dist-info
136K    ./murmurhash
52M     ./sympy
1,9M    ./librosa
3,5M    ./_soundfile_data
84K     ./nvidia_cuda_nvrtc_cu12-12.1.105.dist-info
1,1M    ./ecdsa
12M     ./nltk
32K     ./bitstring-4.1.2.dist-info
129M    ./llvmlite
12M     ./tokenizers
188K    ./spacy-3.7.2.dist-info
336K    ./packaging
36K     ./aiosignal-1.3.1.dist-info
88K     ./dateparser_scripts
28K     ./itsdangerous-2.1.2.dist-info
36K     ./g2pkk-0.1.2.dist-info
1,8M    ./google
24K     ./blinker-1.7.0.dist-info
124K    ./g2pkk
180K    ./spacy_loggers
32K     ./audioread-3.0.1.dist-info
35M     ./numpy.libs
24K     ./gruut_lang_es-2.0.0.dist-info
5,2M    ./aiohttp
28K     ./triton-2.2.0.dist-info
90M     ./scipy
180K    ./numpy-1.22.0.dist-info
1,5G    ./torch
92K     ./tqdm-4.66.2.dist-info
688K    ./esptool
100K    ./pytz-2024.1.dist-info
476K    ./multidict
28K     ./zipp-3.17.0.dist-info
2,7M    ./dateparser
52K     ./langcodes-3.3.0.dist-info
68K     ./yarl-1.9.4.dist-info
396K    ./attr
1,8M    ./psutil
32K     ./tzlocal-5.2.dist-info
320K    ./sympy-1.12.dist-info
48K     ./joblib-1.3.2.dist-info
8,7M    ./sudachipy
40K     ./pooch-1.8.0.dist-info
44K     ./nvidia_cudnn_cu12-8.9.2.26.dist-info
36K     ./typer-0.9.0.dist-info
11M     ./torchaudio
24K     ./tokenizers-0.15.2.dist-info
68K     ./thinc-8.2.3.dist-info
40K     ./absl_py-2.1.0.dist-info
692K    ./click
36K     ./typing_extensions-4.9.0.dist-info
28K     ./protobuf-4.25.2.dist-info
11M     ./tensorboard
20K     ./aiosignal
24K     ./gruut_lang_de-2.0.0.dist-info
100K    ./dateparser-1.1.8.dist-info
2,1M    ./unidecode
40K     ./importlib_metadata-7.0.1.dist-info
52K     ./encodec-0.1.1.dist-info
124K    ./catalogue
27M     ./spacy

mit insgesamt 6,2GB Daten!
Davon sind
1,5G ./torch -> was ist torch?
2,8G ./nvidia -> wofür nvidia?

In ~/.cache/pip/http wurden 3,2GB Daten herunter geladen!
Was kann davon für den Betrieb weg?

@git2fa
Copy link
Author

git2fa commented Feb 15, 2024

torch ist Teil von AI / KI
https://g-airborne.com/bringing-your-deep-learning-model-to-production-with-libtorch-part-1-why-libtorch/

Warum wurde alles im Home-Verzeichnis des Benutzers installiert, obwohl die Installation wie vorgeschlagen so ausgeführt worden ist?

cd /srv/bin/tts
python3 -m venv .
pip install setuptools wheel tts -U

@thorstenMueller
Copy link
Owner

Ja, der große "Overhead" bei den Coqui TTS Modellen ist tatsächlich etwas unschön. Das wurde in der Community auch öfters thematisiert. Eine Lösung das auszudünnen ist mir nicht bekannt. Vielleicht schau dir lieber mein Piper TTS Modell an, da hast Du fast gar keinen Overhead.

@git2fa
Copy link
Author

git2fa commented Mar 5, 2024

Bislang ist noch immer das eigentliche Problem, daß diese Lösung in Debian 11 nicht zum funktionieren gebracht werden konnte.
Das ist schade, weil Deine Sprachausgabe in den Demo-Audios sehr gut klingt.
Wo ist eine alternative Lösung mit einem Piper TTS Modell zu finden?

@thorstenMueller
Copy link
Owner

Mit Debian habe ich es noch nicht probiert, sondern nur auf Ubuntu und da hatte ich keine Probleme.
Hier habe ich ein deutschsprachiges Tutorial wie du meine "Thorsten-Voice" mit Piper TTS auf Raspberry verwendest. Das könnte dir für Debian hoffentlich auch helfen.
https://youtu.be/9e1Wt82GKmU?si=pAURYTt3cH0Y6moT

Auf jeden Fall wünsche ich dir viel Erfolg.

@git2fa
Copy link
Author

git2fa commented Mar 16, 2024

O.K. Dann wird der erste Versuch komplett aufgegeben.

Danke für den Link auf das Video!
Dieser Ansatz erscheint ohnehin viel besser und funktioniert direkt auf Anhieb unter Debian 11.

Download und entpacken:
https://github.com/rhasspy/piper
https://github.com/rhasspy/piper/releases/download/v1.2.0/piper_amd64.tar.gz

Sprachmodell:
https://huggingface.co/rhasspy/piper-voices/tree/v1.0.0/de/de_DE
https://huggingface.co/rhasspy/piper-voices/tree/v1.0.0/de/de_DE/thorsten/high

echo 'Das ist ein Thorsten Test in der Hoffnung das es funktioniert' | ./piper --model de_DE-thorsten-high.onnx --output_file thorsten.wav

echo 'Das ist ein Thorsten Test in der Hoffnung das es funktioniert' | ./piper --model de_DE-thorsten-high.onnx --output-raw |  aplay -r 22050 -f S16_LE -t raw -

Die gesamte Installation belegt hier lediglich 156 MB.
Jetzt muß man nur noch schauen wie man das als Sprachausgabe in das KDE integrieren kann ...

thorsten.wav.zip

Das klingt sehr gut!

@thorstenMueller
Copy link
Owner

Freut mich sehr, dass es mit Piper TTS und meiner Stimme so einfach funktioniert hat 😊.
Viel Erfolg bei der KDE Integration. Wäre toll, wenn Du diesen Beitrag hier zur KDE Integration etwas auf dem Laufenden halten könntest - finde das Thema interessant. Außerdem könnte es ein informatives Video-Tutorial werden.

@git2fa
Copy link
Author

git2fa commented Mar 16, 2024

Wenn sich eine Lösung für die Integration in KDE 5 findet wird es hier vermerkt.

https://techbase.kde.org/Development/Tutorials/Text-To-Speech

Es findet sich weder ein jovie noch ein kcmkttsd in Debian 11. :-(

Die Dokumentation ist veraltet und inzwischen archiviert.
Generell muß man feststellen, daß in Debian 8 noch deutlich mehr Dinge funktionierten als in Debian 11.
Die Optik scheint inzwischen wichtiger zu sein als die Funktionalität. Das ist keine schöne Entwicklung ...

Hier ist etwas, aber dafür muß man sich Mal wieder mit Python auskennen:
https://github.com/u5893405/noti-reader

@git2fa
Copy link
Author

git2fa commented Mar 16, 2024

Vielleicht sollte man das Problem eher applikationsspezifisch angehen.
Ein hervorragendes Standardprogramm zur Anzeige der unterschiedlichsten Dokumentenarten ist Okular in KDE:
https://okular.kde.org/de/
In Okular kann Text einfach markiert werden und im Kontextmenü wird "Text vorlesen" angeboten.
Dies funktioniert sogar, allerdings nur mit der fürchterlichen Sprachausgabe von espeak:
https://espeak.sourceforge.net/

Es geht nun also darum, die speech to text engine zu ersetzen.

Die Zusammenhänge:

You need several basic information mentioned below in order to run this TTS system on your GNU/Linux:

  • Different GNU/Linux distro may have a few different settings.
    Like a hamburger, there are layers: your GNU/Linux system -> sound server -> dispatcher -> synthesizer -> program to open text (Okular)
  • TTS on Okular PDF Reader is basically cooperation between programs: synthesizer reads the text and translate it to speech, then dispatcher catches it, and dispatcher sends it to sound server, finally you hear the speech.
  • Dispatcher here is a program called speech-dispatcher, must be active for TTS system to run otherwise no speech could be heard.
  • Sound server here is a program called pulseaudio, as we use Ubuntu as example (other distro may use alsa instead)
  • Synthesizer here is a program called espeak, one among many synthesizers available on GNU/Linux.
  • Short definitions: dispatcher is the connector between synthesizer and other programs; sound server is the built-in program that produce sound output on your GNU/Linux; synthesizer is the real thing that do Text To Speech (TTS).
  • Okular needs a certain additional program ("plugin") to do TTS. It's called qtspeech5-speechd-plugin on Ubuntu. Without this, Okular will not read out loud.

Zum Thema Speech_dispatcher:

Speech Dispatcher is a device independent layer for speech synthesis that provides a common easy to use interface for both client applications (programs that want to speak) and for software synthesizers (programs actually able to convert text to speech).

und zum Test:

Using speech-dispatcher directly is not a common scenario as its intended to provide an access layer to other speech synthesis engines, that said you can interact with it directly by using the included spd-say binary as follows:
$ spd-say "Arch Linux is the best"

In /etc/speech-dispatcher/speechd.conf findet man
DefaultModule espeak-ng
und in dem Unterverzeichnis modules eine Reihe von Konfigurationsdateien für verschiedene speech-to-text engines.

Nun muß man herausfinden wie dies auf piper umgestrickt werden kann ...
Hier ist schon Mal ein Link mit einer Lösung: rhasspy/piper#328

Fortsetzung folgt (hoffentlich) :-)

@thorstenMueller
Copy link
Owner

"Lernstick" (Linux Live-Distro) ist ein tolles Projekt aus der Schweiz, was auch Piper als Sprachsynthese verwendet. Vielleicht kann man da etwas Inspiration finden.
https://www.bfh.ch/de/forschung/forschungsbereiche/lernstick/

@git2fa
Copy link
Author

git2fa commented Mar 17, 2024

Die älteren Knoppix-Versionen hatten ebenfalls eine Sprachunterstützung.
Wie bereits beschrieben war in den älteren Versionen mit KTTS (KDE Text-to-Speech System) die Sprachausgabe ein fester Bestandteil von KDE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants