Replies: 1 comment
-
engine=EdgeEngine().set_voice("en-IN-NeerjaNeural")This code creates a temporary EdgeEngine, calls set_voice and then sets the value of your engine variable to the return value of set_voice, which is None. Therefore later you get the "AttributeError: 'NoneType' object has no attribute 'get_stream_info'" in the line getformat, channels, rate = self.engine.get_stream_info(), because your self.engine is None. Change above code to: engine=EdgeEngine()
engine.set_voice("en-IN-NeerjaNeural")and you should be good. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
hi
i am working over a project so i need a real time tts model for the project. I came across this RealtimeTTS and using EdgeEngine
but i am facing problem as i am trying to change the voice of the engine
my code is
from RealtimeTTS import TextToAudioStream, SystemEngine, AzureEngine, ElevenlabsEngine, EdgeEngine,GTTSEngine
from time import time
text_stream='''
hello prem
'''
engine=EdgeEngine().set_voice("en-IN-NeerjaNeural")
stream=TextToAudioStream(engine)
a=time()
stream.feed(text_stream)
b=time()
print(b-a)
stream.play()
error is
C:\Users\Prem\Desktop\innerve\MY_TTS\venv\Scripts\python.exe C:\Users\Prem\Desktop\innerve\MY_TTS\realtime.py
Traceback (most recent call last):
File "C:\Users\Prem\Desktop\innerve\MY_TTS\realtime.py", line 9, in
stream=TextToAudioStream(engine)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Prem\Desktop\innerve\MY_TTS\venv\Lib\site-packages\RealtimeTTS\text_to_stream.py", line 168, in init
self.load_engine(self.engines[self.engine_index])
File "C:\Users\Prem\Desktop\innerve\MY_TTS\venv\Lib\site-packages\RealtimeTTS\text_to_stream.py", line 183, in load_engine
format, channels, rate = self.engine.get_stream_info()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_stream_info'
Process finished with exit code 1
can anyone help me in changing the voice and speed of voice
Beta Was this translation helpful? Give feedback.
All reactions