Trying to run Tortoise-TTS program, getting errors - python

I am trying to run this text-to-speech program
I followed instructions verbatim, but when I go to run the first line of code (below)
python tortoise/do_tts.py --text "I'm going to speak this" --voice random --preset fast
I get he following error code:
C:\Users\chase\anaconda3\lib\site-packages\torchaudio\_internal\module_utils.py:99: UserWarning: Failed to import soundfile. 'soundfile' backend is not available.
warnings.warn("Failed to import soundfile. 'soundfile' backend is not available.")
C:\Users\chase\anaconda3\lib\site-packages\paramiko\transport.py:219: CryptographyDeprecationWarning: Blowfish has been deprecated
"class": algorithms.Blowfish,
Traceback (most recent call last):
File "C:\Users\chase\anaconda3\lib\site-packages\soundfile.py", line 152, in <module>
_snd = _ffi.dlopen(_libname)
OSError: cannot load library 'C:\Users\chase\anaconda3\Library\bin\sndfile.dll': error 0x7e
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\chase\anaconda3\lib\site-packages\soundfile.py", line 178, in <module>
_snd = _ffi.dlopen(_os.path.join(_path, '_soundfile_data', _packaged_libname))
OSError: cannot load library 'C:\Users\chase\anaconda3\lib\site-packages\_soundfile_data\libsndfile_64bit.dll': error 0x7e
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\chase\tortoise-tts\tortoise\do_tts.py", line 7, in <module>
from api import TextToSpeech, MODELS_DIR
File "C:\Users\chase\tortoise-tts\tortoise\api.py", line 22, in <module>
from tortoise.utils.audio import wav_to_univnet_mel, denormalize_tacotron_mel
File "C:\Users\chase\anaconda3\lib\site-packages\tortoise-2.4.2-py3.9.egg\tortoise\utils\audio.py", line 4, in <module>
import librosa
File "C:\Users\chase\anaconda3\lib\site-packages\librosa-0.9.2-py3.9.egg\librosa\__init__.py", line 209, in <module>
from . import core
File "C:\Users\chase\anaconda3\lib\site-packages\librosa-0.9.2-py3.9.egg\librosa\core\__init__.py", line 6, in <module>
from .audio import * # pylint: disable=wildcard-import
File "C:\Users\chase\anaconda3\lib\site-packages\librosa-0.9.2-py3.9.egg\librosa\core\audio.py", line 8, in <module>
import soundfile as sf
File "C:\Users\chase\anaconda3\lib\site-packages\soundfile.py", line 189, in <module>
_snd = _ffi.dlopen(_libname)
OSError: cannot load library 'libsndfile.dll': error 0x7e
I expected it to run

Try on linux, it works fine for me.

Related

using Textatistic: OSError: Cannot load hyphen dictionary

I am trying to use Textatistic. However it curs a error and I have am searching for a long time on net. But no use. Please help or try to give some ideas how to achieve this.
The source code is
from pathlib import Path
import textatistic
text = Path('Robinson Crusoe.txt').read_text(encoding='utf-8')
readability = textatistic.Textatistic(text)
print(readability.dict())
Traceback (most recent call last):
File "D:\anaconda3\lib\site-packages\hyphen\hyphenator.py", line 60, in __init__
self.__hyphenate__ = hnj.hyphenator_(file_path,
OSError: Cannot load hyphen dictionary.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\Demos\python_demo\main.py", line 2, in <module>
import textatistic
File "D:\anaconda3\lib\site-packages\textatistic\__init__.py", line 27, in <module>
from .textatistic import *
File "D:\anaconda3\lib\site-packages\textatistic\textatistic.py", line 39, in <module>
class Textatistic(object):
File "D:\anaconda3\lib\site-packages\textatistic\textatistic.py", line 42, in Textatistic
def __init__(self, text, abbr=Abbreviations(), hyphen=Hyphenator('en_US'), easy=EasyWords()):
File "D:\anaconda3\lib\site-packages\hyphen\hyphenator.py", line 64, in __init__
raise RuntimeError(f'C extension raised error \
RuntimeError: C extension raised error when initializing Hyphenator for dictionary at C:\Users\root\AppData\Local\pyhyphen\hyph_en_US.dic
Please tell me how to do!

Vpython on Raspberry Pi 4b

i bought a rapberry pi 4 to code, i know is not the best platform, but recently my computer got stolen and its all i can afford right know.
im trying to get vpython to run.
these is the code that im trying to run
import vpython
ball=vpython.sphere()
while True:
pass
but it gives me these error.
Traceback (most recent call last):
File "/home/maviles/Documents/py-course/Vputhon/vppython.py", line 2, in <module>
ball=vpython.sphere()
File "/home/maviles/.local/lib/python3.9/site-packages/vpython/vpython.py", line 1172, in __init__
super(sphere, self).setup(args)
File "/home/maviles/.local/lib/python3.9/site-packages/vpython/vpython.py", line 599, in setup
super(standardAttributes, self).__init__()
File "/home/maviles/.local/lib/python3.9/site-packages/vpython/vpython.py", line 259, in __init__
from .no_notebook import _
File "/home/maviles/.local/lib/python3.9/site-packages/vpython/no_notebook.py", line 12, in <module>
from autobahn.asyncio.websocket import WebSocketServerProtocol, WebSocketServerFactory
File "/home/maviles/.local/lib/python3.9/site-packages/autobahn/asyncio/__init__.py", line 32, in <module>
from autobahn.asyncio.websocket import \
File "/home/maviles/.local/lib/python3.9/site-packages/autobahn/asyncio/websocket.py", line 36, in <module>
from autobahn.util import public, hltype
File "/home/maviles/.local/lib/python3.9/site-packages/autobahn/util.py", line 49, in <module>
from OpenSSL import SSL
File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1556, in <module>
class X509StoreFlags(object):
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1577, in X509StoreFlags
CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
exit
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/home/maviles/.local/lib/python3.9/site-packages/vpython/vpython.py", line 22, in Exit
a = 1.0/zero
ZeroDivisionError: float division by zero
Exception ignored in: <function standardAttributes.__del__ at 0x7f93664550>
Traceback (most recent call last):
File "/home/maviles/.local/lib/python3.9/site-packages/vpython/vpython.py", line 1159, in __del__
super(standardAttributes, self).__del__()
File "/home/maviles/.local/lib/python3.9/site-packages/vpython/vpython.py", line 340, in __del__
cmd = {"cmd": "delete", "idx": self.idx}
AttributeError: 'sphere' object has no attribute 'idx'
please help.
i could not find anything on these topic for the raspberry 4b
i try to run the code and expec it to open a window with a sphere

i have an error while making an artificial assistant in python

i have an error with speech recognition and pyaudio but it's all installed
PS C:\Users\giova> & C:/Users/giova/AppData/Local/Microsoft/WindowsApps/python3.10.exe
"c:/Users/giova/OneDrive/Desktop/python/ai e assistenti/assistente tutorial pit pro/assis.py"
Traceback (most recent call last):
File "C:\Users\giova\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\speech_recognition\__init__.py", line 108, in get_pyaudio
import pyaudio
ModuleNotFoundError: No module named 'pyaudio'
AttributeError: Could not find PyAudio; check installation
PS C:\Users\giova> & C:/Users/giova/AppData/Local/Microsoft/WindowsApps/python3.10.exe "c:/Users/giova/OneDrive/Desktop/python/ai e assistenti/assistente tutorial pit pro/assis.py"
Traceback (most recent call last):
File "C:\Users\giova\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\speech_recognition\__init__.py", line 108, in get_pyaudio
import pyaudio
ModuleNotFoundError: No module named 'pyaudio'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\giova\OneDrive\Desktop\python\ai e assistenti\assistente tutorial pit pro\assis.py", line 9, in <module>
with Microphone() as source:
File "C:\Users\giova\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\speech_recognition\__init__.py", line 79, in __init__
self.pyaudio_module = self.get_pyaudio()
File "C:\Users\giova\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\speech_recognition\__init__.py", line 110, in get_pyaudio
raise AttributeError("Could not find PyAudio; check installation")
AttributeError: Could not find PyAudio; check installation
with this code :
from pyttsx3 import init
from speech_recognition import Recognizer, Microphone
engine = init()
engine.say("che cavolo vuoi")
engine.runAndWait()
r = Recognizer()
with Microphone() as source:
print("pronto ad ascoltare...")
audio = r.listen(source)
testo = r.recognize_google(audio, Lenguage="it-IT")
print(testo)
I am following an tutorial and idk why this error appears to me

ImportError: attempted relative import with no known parent package - python 3

Try 'flask run --help' for help.
Error: While importing "main", an ImportError was raised:
Traceback (most recent call last):
File "/home/anirudh/Downloads/blinktrustapis-main/main.py", line 9, in
from .apis.appServer import AppServer
ImportError: attempted relative import with no known parent package
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/flask/cli.py", line 240, in locate_app
import(module_name)
File "/home/anirudh/Downloads/blinktrustapis-main/main.py", line 11, in
from apis.appServer import AppServer
File "/home/anirudh/Downloads/blinktrustapis-main/apis/appServer.py", line 32, in
from apis.utility import *
File "/home/anirudh/Downloads/blinktrustapis-main/apis/utility.py", line 6, in
from dataprofiler.piiservice.api import ScanTypeEnum, list_detectors, scan_database
File "/home/anirudh/Downloads/blinktrustapis-main/dataprofiler/piiservice/api.py", line 6, in
from dataprofiler.catelogs.api import scan_sources
File "/home/anirudh/Downloads/blinktrustapis-main/dataprofiler/catelogs/api.py", line 13, in
from dataprofiler.catelogs.catalog.db import DbScanner
File "/home/anirudh/Downloads/blinktrustapis-main/dataprofiler/catelogs/catalog/db.py", line 6, in
from databuilder import Scoped
ImportError: cannot import name 'Scoped' from 'databuilder' (/home/anirudh/.local/lib/python3.9/site-packages/databuilder/init.py)

matplotlib python3.4.1 win7

I am using python3.4.1 in win7
And I wana use matplotlib.
but this error code has occured.
Could you help me?
>>> text4.dispersion_plot(["citizens", "democracy", "freedom", "duties", "America"])
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\nltk\draw\dispersion.py", line 25, in dispersion_plot
import pylab
File "C:\Python34\lib\site-packages\pylab.py", line 1, in <module>
from matplotlib.pylab import *
File "C:\Python34\lib\site-packages\matplotlib\__init__.py", line 105, in <module>
import six
ImportError: No module named 'six'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
text4.dispersion_plot(["citizens", "democracy", "freedom", "duties", "America"])
File "C:\Python34\lib\site-packages\nltk\text.py", line 445, in dispersion_plot
dispersion_plot(self, words)
File "C:\Python34\lib\site-packages\nltk\draw\dispersion.py", line 27, in dispersion_plot
raise ValueError('The plot function requires the matplotlib package (aka pylab).'
ValueError: The plot function requires the matplotlib package (aka pylab).See
http://matplotlib.sourceforge.net/
>>>

Categories