rany2 / edge-tts

Use Microsoft Edge's online text-to-speech service from Python WITHOUT needing Microsoft Edge or Windows or an API key
https://pypi.org/project/edge-tts/
GNU General Public License v3.0
5.46k stars 557 forks source link

has no attribute 'Communicate' #247

Closed NAMEs closed 1 day ago

NAMEs commented 1 month ago

AttributeError: module 'edge_tts' has no attribute 'Communicate'

rany2 commented 1 month ago

How did you install edge_tts?

NAMEs commented 1 month ago

pip install edge-tts

Python 3.11.9

NAMEs commented 1 month ago

Name: edge-tts Version: 6.1.12 Summary: Microsoft Edge's TTS Home-page: https://github.com/rany2/edge-tts Author: rany Author-email: ranygh@riseup.net

rany2 commented 1 month ago

I'm not sure, what is the output of

import edge_tts
print(edge_tts.__dir__())
print(edge_tts.__version__)
indiejoseph commented 1 day ago

Got same issue:

import edge_tts
print(edge_tts.__dir__())
print(edge_tts.__version__)

Output:

['__name__', '__doc__', '__package__', '__loader__', '__spec__', '__file__', '__cached__', '__builtins__', 'os', 'requests', 'pd', 'tqdm', 'edge_tts', 'tts']
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[6], [line 3](vscode-notebook-cell:?execution_count=6&line=3)
      [1](vscode-notebook-cell:?execution_count=6&line=1) from edge_tts import edge_tts
      [2](vscode-notebook-cell:?execution_count=6&line=2) print(edge_tts.__dir__())
----> [3](vscode-notebook-cell:?execution_count=6&line=3) print(edge_tts.__version__)

AttributeError: module 'edge_tts' has no attribute '__version__'
indiejoseph commented 1 day ago

Found out i have a edge_tts.py in the root dir that importing wrong module.

rename it resolve this problem

rany2 commented 1 day ago

I guess it's solved then.