Spaces:
Running
ImportError: cannot import name 'get_tts_model' from 'fastrtc'
I'm trying to run python app.py
but I'm getting the following error:
Traceback (most recent call last):
File "/Users/dleewo/Source/python/gemini-conversation/app.py", line 10, in <module>
from fastrtc import (
ImportError: cannot import name 'get_tts_model' from 'fastrtc' (/Users/dleewo/Source/python/gemini-conversation/env/lib/python3.12/site-packages/fastrtc/__init__.py)
Any idea what is going on?
I did notice the following warnings when installing the packages from requirements.txt:
WARNING: fastrtc 0.0.2.post6 does not provide the extra 'tts'
Using cached fastrtc-0.0.2.post5-py3-none-any.whl.metadata (18 kB)
WARNING: fastrtc 0.0.2.post5 does not provide the extra 'tts'
Using cached fastrtc-0.0.2.post4-py3-none-any.whl.metadata (18 kB)
WARNING: fastrtc 0.0.2.post4 does not provide the extra 'tts'
Hi @dleewo can you upgrade the fastrtc package to the latest version ?
When I did a pip install --upgrade fastrtc[tts]
it says all requirements have been satisfied
When I look at the site-packages
in my virtual environment I see folders:
fastrtc
fastrtc-0.0.2.post6.dist-info
Is there a specific version I should try and install?
The latest version is 0.0.9. Can you try installing that. My guess is that maybe you’re installing in an environment that has conflicting dependencies (like numpy 1.0). Fastrtc has ro use numpy 2.0.
I've been using brand new environments so I don't have any old packages around. Also, when I checked the NumPy version in the environment, it is 2.1.3 so I'm good there.
When I try to do pip install fastrtc[tts]==0.0.9
I get
ERROR: Cannot install fastrtc because these package versions have conflicting dependencies.
The conflict is caused by:
kokoro-onnx 0.4.4 depends on onnxruntime>=1.20.1
kokoro-onnx 0.4.3 depends on onnxruntime>=1.20.1
kokoro-onnx 0.4.2 depends on onnxruntime>=1.20.1
kokoro-onnx 0.4.1 depends on onnxruntime>=1.20.1
kokoro-onnx 0.4.0 depends on onnxruntime>=1.20.1
kokoro-onnx 0.3.9 depends on onnxruntime>=1.20.1
kokoro-onnx 0.3.8 depends on onnxruntime>=1.20.1
kokoro-onnx 0.3.7 depends on onnxruntime>=1.20.1
kokoro-onnx 0.3.6 depends on onnxruntime>=1.20.1
kokoro-onnx 0.3.5 depends on onnxruntime>=1.20.1
kokoro-onnx 0.3.4 depends on onnxruntime>=1.20.1
kokoro-onnx 0.3.3 depends on onnxruntime>=1.20.1
kokoro-onnx 0.3.2 depends on onnxruntime>=1.20.1
kokoro-onnx 0.3.1 depends on onnxruntime>=1.20.1
kokoro-onnx 0.3.0 depends on onnxruntime>=1.20.1
kokoro-onnx 0.2.9 depends on onnxruntime>=1.20.1
kokoro-onnx 0.2.8 depends on onnxruntime>=1.20.1
kokoro-onnx 0.2.7 depends on onnxruntime>=1.20.1
kokoro-onnx 0.2.6 depends on onnxruntime>=1.20.1
kokoro-onnx 0.2.5 depends on onnxruntime>=1.20.1
kokoro-onnx 0.2.3 depends on onnxruntime>=1.20.1
kokoro-onnx 0.2.2 depends on onnxruntime>=1.20.1
kokoro-onnx 0.2.1 depends on onnxruntime>=1.20.1
kokoro-onnx 0.2.0 depends on onnxruntime>=1.20.1
kokoro-onnx 0.1.9 depends on onnxruntime>=1.20.1
kokoro-onnx 0.1.8 depends on onnxruntime>=1.20.1
kokoro-onnx 0.1.7 depends on onnxruntime>=1.20.1
kokoro-onnx 0.1.6 depends on onnxruntime>=1.20.1
kokoro-onnx 0.1.5 depends on onnxruntime>=1.20.1
kokoro-onnx 0.1.4 depends on onnxruntime>=1.20.1
kokoro-onnx 0.1.3 depends on onnxruntime>=1.20.1
kokoro-onnx 0.1.2 depends on onnxruntime>=1.20.1
kokoro-onnx 0.1.1 depends on onnxruntime>=1.20.1
kokoro-onnx 0.1.0 depends on onnxruntime>=1.20.1
Again, all I did was created a brand new environment using python3 -m venv env
and then pip install -r requirements.txt
Can I assume that if you setup a brand new environment for the project and did the same pip install, it all works just fine for you?
What version of python are you using?
I'm using 3.12.7 on a Mac. If you think that is the issue, I can try Python 13
Can you try python -m pip install -r requirements.txt
to make absolutely sure you're using the pip inside the new environment? Also did you activate the environment before pip installing? 😀
Cause I just tried on 3.12 on a mac with both uv and pip and it worked in a fresh env.