Comments (8)
Just curious, why is it that the filename would affect whether or not the program works?
It makes sense, the from deepspeech import Model
would consider deepspeech
module to be your deepspeech.py
:-)
from deepspeech-examples.
from deepspeech-examples.
Thanks for the help. I hope this isn't too verbose, but here is the steps I took:
[MYUSERNAME@MYPC MYPROJECTFOLDER]$ virtualenv -p python3 $HOME/tmp/deepspeech-venv/ Running virtualenv with interpreter /usr/bin/python3 Using base prefix '/usr' New python executable in /home/MYUSERNAME/tmp/deepspeech-venv/bin/python3 Not overwriting existing python script /home/MYUSERNAME/tmp/deepspeech-venv/bin/python (you must use /home/MYUSERNAME/tmp/deepspeech-venv/bin/python3) Installing setuptools, pip, wheel... done.
[MYUSERNAME@MYPC MYPROJECTFOLDER]$ source $HOME/tmp/deepspeech-venv/bin/activate
(deepspeech-venv) [MYUSERNAME@MYPC MYPROJECTFOLDER]$ sudo pip3 install --force deepspeech Collecting deepspeech Using cached https://files.pythonhosted.org/packages/f7/ad/cde815d6b3745f506184c095a8021ebefddc04981d61c780d04ef1224024/deepspeech-0.6.0-cp38-cp38-manylinux1_x86_64.whl Collecting numpy>=1.17.3 Using cached https://files.pythonhosted.org/packages/d7/6a/3fed132c846d1e47963f30376cc041e9dd586d286d931055ad06ff65c6c7/numpy-1.17.4-cp38-cp38-manylinux1_x86_64.whl Installing collected packages: numpy, deepspeech Found existing installation: numpy 1.17.4 Uninstalling numpy-1.17.4: Successfully uninstalled numpy-1.17.4 Found existing installation: deepspeech 0.6.0 Uninstalling deepspeech-0.6.0: Successfully uninstalled deepspeech-0.6.0 Successfully installed deepspeech-0.6.0 numpy-1.17.4
(deepspeech-venv) [MYUSERNAME@MYPC MYPROJECTFOLDER]$ deepspeech --model deepspeech-0.6.0-models/output_graph.pbmm --lm deepspeech-0.6.0-models/lm.binary --trie deepspeech-0.6.0-models/trie --audio audio/2830-3980-0043.wav Loading model from file deepspeech-0.6.0-models/output_graph.pbmm TensorFlow: v1.14.0-21-ge77504a DeepSpeech: v0.6.0-0-g6d43e21 Loaded model in 0.0658s. Loading language model from files deepspeech-0.6.0-models/lm.binary deepspeech-0.6.0-models/trie Loaded language model in 0.000287s. Running inference. experience proof less Inference took 2.650s for 1.975s audio file.
(deepspeech-venv) [MYUSERNAME@MYPC MYPROJECTFOLDER]$ python3 deepspeech.py --model deepspeech-0.6.0-models/output_graph.pbmm --lm deepspeech-0.6.0-models/lm.binary --trie deepspeech-0.6.0-models/trie Initializing model... INFO:root:ARGS.model: deepspeech-0.6.0-models/output_graph.pbmm **Traceback (most recent call last): File "deepspeech.py", line 237, in <module> main(ARGS) File "deepspeech.py", line 164, in main model = deepspeech.Model(ARGS.model, ARGS.beam_width) AttributeError: module 'deepspeech' has no attribute 'Model'**
As you can see, it worked fine when using the DeepSpeech example from the main repo's README, but when I executed deepspeech.py (which is an exact copy of mic_vad_streaming.py) it gave the same error as before.
P.S.: I might be AFK for a little bit before I get to work on it again.
from deepspeech-examples.
You are setting up a virtual env and still use sudo
to run pip. This can only lead to mess and inconsistent setup
from deepspeech-examples.
You are setting up a virtual env and still use
sudo
to run pip. This can only lead to mess and inconsistent setup
Good point, I didn't even consider that.
I created a different venv, installed all the needed libraries using pip
without sudo
and ran it again but I keep getting the same error.
from deepspeech-examples.
You are setting up a virtual env and still use
sudo
to run pip. This can only lead to mess and inconsistent setupGood point, I didn't even consider that.
I created a different venv, installed all the needed libraries usingpip
withoutsudo
and ran it again but I keep getting the same error.
Can you also ensure the python3
command you issue does properly load the expected python from virtualenv ? Can you verify pip list
as well ?
That's really really weird ...
from deepspeech-examples.
(deepspeech-venv) [MYUSERNAME@MYPC MYPROJECTFOLDER]$ python3 deepspeech.py --model deepspeech-0.6.0-models/output_graph.pbmm --lm deepspeech-0.6.0-models/lm.binary --trie deepspeech-0.6.0-models/trie Initializing model... INFO:root:ARGS.model: deepspeech-0.6.0-models/output_graph.pbmm Traceback (most recent call last): File "deepspeech.py", line 237, in main(ARGS) File "deepspeech.py", line 164, in main model = deepspeech.Model(ARGS.model, ARGS.beam_width) AttributeError: module 'deepspeech' has no attribute 'Model'
WAIT WAIT WAIT
What is this deepspeech.py
? Where does it comes from ? That's not in any of the examples as much as I can see.
from deepspeech-examples.
(deepspeech-venv) [MYUSERNAME@MYPC MYPROJECTFOLDER]$ python3 deepspeech.py --model deepspeech-0.6.0-models/output_graph.pbmm --lm deepspeech-0.6.0-models/lm.binary --trie deepspeech-0.6.0-models/trie Initializing model... INFO:root:ARGS.model: deepspeech-0.6.0-models/output_graph.pbmm Traceback (most recent call last): File "deepspeech.py", line 237, in main(ARGS) File "deepspeech.py", line 164, in main model = deepspeech.Model(ARGS.model, ARGS.beam_width) AttributeError: module 'deepspeech' has no attribute 'Model'
WAIT WAIT WAIT
What is this
deepspeech.py
? Where does it comes from ? That's not in any of the examples as much as I can see.
It's working now. Thanks for your help @lissyx and @reuben. I named my testing file deepspeech.py
just to test it. I didn't know that you couldn't name a python file the same as a library being used in it. If I name it to anything else, it works.
Just curious, why is it that the filename would affect whether or not the program works?
from deepspeech-examples.
Related Issues (20)
- Error while running HOT 1
- Corrupt SRT output
- Run mic_vad_streaming.py got error HOT 1
- Cannot find DOWNSAMPLING_WORKER for Web Microphone Websocket streaming HOT 1
- pyaudio setup error HOT 2
- BUG: mic_vad_streaming partially recognizing voice HOT 4
- [Android] Could not find org.mozilla.deepspeech:libdeepspeech:0.9.3. HOT 1
- cannot find node_modules/deepspeech/lib/binding/v0.9.3/linux-x64/node-v93/deepspeech.node HOT 7
- Deepspeech C# crashes
- pause ASR when speaker is outputting
- not starting
- Cannot connect to server socket err = No such file or directory Cannot connect to server request channel
- .Net Framework example missing DeepSpeechClient solution? HOT 1
- tc-tests-utils.sh not found HOT 1
- Non authorized instruction
- Cannot find the model file: deepspeech-0.9.3-models.pbmm HOT 2
- Error: Could not locate the bindings file. Tried:
- Accuracy is too low in 0.9.3 model HOT 1
- Failed to execute startup script HOT 1
- Not getting stt with nodejs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepspeech-examples.