GithubHelp home page GithubHelp logo

coqui-ai / stt-model-manager Goto Github PK

View Code? Open in Web Editor NEW
23.0 9.0 16.0 8.74 MB

Coqui STT Model Manager - install, manage and try out Coqui STT models from the Model Zoo

Home Page: https://coqui.ai

License: Mozilla Public License 2.0

Python 23.74% HTML 6.06% Makefile 0.67% JavaScript 67.80% CSS 1.73%
python stt speech-recognition flask react websocket coqui-ai

stt-model-manager's People

Contributors

dependabot[bot] avatar jrmeyer avatar kdavis-coqui avatar kellyjdavis avatar lanzaa avatar reuben avatar snyk-bot avatar wasertech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stt-model-manager's Issues

the default quickstart instructions do not work out of the box on raspberry pi4(00)

It appears to be some problem with versions:

pi@raspberrypi:~ $ python3 -m venv venv-stt
pi@raspberrypi:~ $ source venv-stt/bin/activate
(venv-stt) pi@raspberrypi:~ $ python -m pip install -U pip
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: pip in ./venv-stt/lib/python3.9/site-packages (20.3.4)
Collecting pip
  Downloading https://www.piwheels.org/simple/pip/pip-22.0.4-py3-none-any.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB 171 kB/s 
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.3.4
    Uninstalling pip-20.3.4:
      Successfully uninstalled pip-20.3.4
Successfully installed pip-22.0.4
(venv-stt) pi@raspberrypi:~ $ python -m pip install coqui-stt-model-manager
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting coqui-stt-model-manager
  Downloading https://www.piwheels.org/simple/coqui-stt-model-manager/coqui_stt_model_manager-0.0.19-py3-none-any.whl (599 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 600.0/600.0 KB 89.3 kB/s eta 0:00:00
Collecting Jinja2==3.0.1
  Downloading https://www.piwheels.org/simple/jinja2/Jinja2-3.0.1-py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.7/133.7 KB 44.3 kB/s eta 0:00:00
Collecting pyxdg==0.27
  Downloading https://www.piwheels.org/simple/pyxdg/pyxdg-0.27-py2.py3-none-any.whl (49 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.5/49.5 KB 76.5 kB/s eta 0:00:00
Collecting Flask-SocketIO==4.3.2
  Downloading https://www.piwheels.org/simple/flask-socketio/Flask_SocketIO-4.3.2-py2.py3-none-any.whl (15 kB)
Collecting Flask==2.0.1
  Downloading https://www.piwheels.org/simple/flask/Flask-2.0.1-py3-none-any.whl (94 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 94.8/94.8 KB 75.1 kB/s eta 0:00:00
Collecting webrtcvad==2.0.10
  Downloading https://www.piwheels.org/simple/webrtcvad/webrtcvad-2.0.10-cp39-cp39-linux_armv7l.whl (74 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 74.2/74.2 KB 95.4 kB/s eta 0:00:00
Collecting coqui-stt-model-manager
  Downloading https://www.piwheels.org/simple/coqui-stt-model-manager/coqui_stt_model_manager-0.0.18-py3-none-any.whl (599 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 600.0/600.0 KB 159.8 kB/s eta 0:00:00
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/coqpit/
Collecting coqpit==0.0.9
  Downloading https://www.piwheels.org/simple/coqpit/coqpit-0.0.9-py3-none-any.whl (12 kB)
Collecting Flask-Cors==3.0.10
  Downloading https://www.piwheels.org/simple/flask-cors/Flask_Cors-3.0.10-py2.py3-none-any.whl (14 kB)
Collecting coqui-stt-model-manager
  Downloading https://www.piwheels.org/simple/coqui-stt-model-manager/coqui_stt_model_manager-0.0.17-py3-none-any.whl (599 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 600.0/600.0 KB 81.6 kB/s eta 0:00:00
  Downloading https://www.piwheels.org/simple/coqui-stt-model-manager/coqui_stt_model_manager-0.0.16-py3-none-any.whl (599 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 600.0/600.0 KB 76.2 kB/s eta 0:00:00
  Downloading https://www.piwheels.org/simple/coqui-stt-model-manager/coqui_stt_model_manager-0.0.15-py3-none-any.whl (599 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 599.5/599.5 KB 87.4 kB/s eta 0:00:00
  Downloading https://www.piwheels.org/simple/coqui-stt-model-manager/coqui_stt_model_manager-0.0.14-py3-none-any.whl (599 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 599.5/599.5 KB 166.7 kB/s eta 0:00:00
  Downloading https://www.piwheels.org/simple/coqui-stt-model-manager/coqui_stt_model_manager-0.0.12-py3-none-any.whl (620 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 620.2/620.2 KB 377.7 kB/s eta 0:00:00
Collecting requests==2.25.1
  Downloading https://www.piwheels.org/simple/requests/requests-2.25.1-py2.py3-none-any.whl (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 KB 254.1 kB/s eta 0:00:00
Collecting coqui-stt-model-manager
  Downloading https://www.piwheels.org/simple/coqui-stt-model-manager/coqui_stt_model_manager-0.0.11-py3-none-any.whl (620 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 620.2/620.2 KB 549.7 kB/s eta 0:00:00
  Downloading https://www.piwheels.org/simple/coqui-stt-model-manager/coqui_stt_model_manager-0.0.10-py3-none-any.whl (620 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 620.1/620.1 KB 666.2 kB/s eta 0:00:00
  Downloading https://www.piwheels.org/simple/coqui-stt-model-manager/coqui_stt_model_manager-0.0.9-py3-none-any.whl (620 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 620.1/620.1 KB 585.6 kB/s eta 0:00:00
  Downloading https://www.piwheels.org/simple/coqui-stt-model-manager/coqui_stt_model_manager-0.0.8-py3-none-any.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 720.5 kB/s eta 0:00:00
ERROR: Cannot install coqui-stt-model-manager==0.0.10, coqui-stt-model-manager==0.0.11, coqui-stt-model-manager==0.0.12, coqui-stt-model-manager==0.0.14, coqui-stt-model-manager==0.0.15, coqui-stt-model-manager==0.0.16, coqui-stt-model-manager==0.0.17, coqui-stt-model-manager==0.0.18, coqui-stt-model-manager==0.0.19, coqui-stt-model-manager==0.0.8 and coqui-stt-model-manager==0.0.9 because these package versions have conflicting dependencies.

The conflict is caused by:
    coqui-stt-model-manager 0.0.19 depends on stt==1.1.0
    coqui-stt-model-manager 0.0.18 depends on stt==1.0.0
    coqui-stt-model-manager 0.0.17 depends on stt==0.10.0a13
    coqui-stt-model-manager 0.0.16 depends on stt==0.10.0a13
    coqui-stt-model-manager 0.0.15 depends on stt==0.10.0a13
    coqui-stt-model-manager 0.0.14 depends on stt==0.10.0a13
    coqui-stt-model-manager 0.0.12 depends on stt==0.10.0a6
    coqui-stt-model-manager 0.0.11 depends on stt==0.10.0a6
    coqui-stt-model-manager 0.0.10 depends on stt==0.10.0a6
    coqui-stt-model-manager 0.0.9 depends on stt==0.10.0a6
    coqui-stt-model-manager 0.0.8 depends on stt==0.10.0a6

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Update Webpack

Currently we are using v4.42.0 of Webpack. It's not too old but since the model manager is not an example project but rather a real useful tool for production, it would be a good idea to future proof it by upgrading the configuration.

Some eslint plugins for typescript must be changed (along with their config and eslint-loader) as they are depreciated, two component of react-dev-tools are missing (WatchMissingNodeModulesPlugin and typescriptFormatter), pnp is now included with webpack 5, so the config needs to be seriously upgraded to work with our plugins and a newer version of Webpack and don't even get me started about postcss dependencies debacle.

I made a test with #46 but it didn't went well as I'm not versed enough with webpack and it's ecosystem to really make the necessary changes.

partial downloaded model is not handled correctly .

The problem is partial download is treated as successful download after restart stt-model-manager .
A simple solution can be :

  1. using a tmp file name when downloading , and rename it after successful download.
  2. check file size and continue download after restart

How to reproduce

  1. open stt-model-manager
  2. click "Install a new model from the Coqui STT Model Zoo."
  3. choose any model to install , eg [English STT v0.9.3], wait the first file
  4. stop stt-model-manager before finish downloading ( at process 10%)
  5. restart stt-model-manager , reinstall the model , the process jump to 50% , wait to 51%
  6. stop stt-model-manager and restart again , the model is in "Installed STT models" section.
  7. try to run the model will cause Segmentation fault: 11

Add proper output management

print(f"Installed models: {self.installed_models}")

We shouldn't print this here it quickly becomes a mess when you have lots of models.

>>> from coqui_stt_model_manager.modelmanager import ModelCard, ModelManager
>>> manager = ModelManager()
Installed models: ModelIndex(models=[ModelCard(name='French STT v0.9', language=
'French', version='v0.9', creator='commonvoice-fr', acoustic='https://coqui.gate
way.scarf.sh/french/commonvoice-fr/v0.9/model.tflite', scorer='https://coqui.gat
eway.scarf.sh/french/commonvoice-fr/v0.9/kenlm.scorer', installed=False, acousti
c_path=None, scorer_path=None), ModelCard(name='Welsh STT v21.03', language='Wel
sh', version='v21.03', creator='Dewi Bryn Jones', acoustic='https://coqui.gatewa
y.scarf.sh/welsh/techiaith/v21.03/model.tflite', scorer='https://coqui.gateway.s
carf.sh/welsh/techiaith/v21.03/techiaith_bangor_transcribe_21.03.scorer', instal
led=False, acoustic_path=None, scorer_path=None), ModelCard(name='Catalan STT v0
.14.0', language='Catalan', version='v0.14.0', creator="Ciaran O'Reilly", acoust
ic='https://coqui.gateway.scarf.sh/catalan/ccoreilly/v0.14.0/model.tflite', scor
er='https://coqui.gateway.scarf.sh/catalan/ccoreilly/v0.14.0/kenlm-aina-3-p10.sc
orer', installed=False, acoustic_path=None, scorer_path=None), ModelCard(name='U
krainian STT v0.4', language='Ukrainian', version='v0.4', creator='Yurii Paniv',
 acoustic='https://coqui.gateway.scarf.sh/ukrainian/robinhad/v0.4/model.tflite',
 scorer='https://coqui.gateway.scarf.sh/ukrainian/robinhad/v0.4/kenlm.scorer', i
nstalled=False, acoustic_path=None, scorer_path=None), ModelCard(name='German ST
T v0.9.0', language='German', version='v0.9.0', creator='Aashish Agarwal', acous
tic='https://coqui.gateway.scarf.sh/german/AASHISHAG/v0.9.0/model.tflite', score
r='https://coqui.gateway.scarf.sh/german/AASHISHAG/v0.9.0/de-aashishag-1-prune-k
enlm.scorer', installed=False, acoustic_path=None, scorer_path=None), ModelCard(
name='Italian STT 2020.8.7', language='Italian', version='2020.8.7', creator='Mo
zilla Italia', acoustic='https://coqui.gateway.scarf.sh/italian/mozillaitalia/20
20.8.7/model.tflite', scorer='https://coqui.gateway.scarf.sh/italian/mozillaital
ia/2020.8.7/it-mzit-1-prune-kenlm.scorer', installed=False, acoustic_path=None, 
scorer_path=None), ModelCard(name='Greek STT v0.1.0', language='Greek', version=
'v0.1.0', creator='ITML', acoustic='https://coqui.gateway.scarf.sh/greek/itml/v0
.1.0/model.tflite', scorer='https://coqui.gateway.scarf.sh/greek/itml/v0.1.0/Gre
ek-digits-yesno.scorer', installed=False, acoustic_path=None, scorer_path=None),
 ModelCard(name='Irish STT v0.1.1', language='Irish', version='v0.1.1', creator=
'ITML', acoustic='https://coqui.gateway.scarf.sh/irish/itml/v0.1.1/model.tflite'
, scorer='https://coqui.gateway.scarf.sh/irish/itml/v0.1.1/Irish-digits-yesno.sc
orer', installed=False, acoustic_path=None, scorer_path=None), ModelCard(name='B
reton STT v0.1.0', language='Breton', version='v0.1.0', creator='ITML', acoustic
='https://coqui.gateway.scarf.sh/breton/itml/v0.1.0/model.tflite', scorer='https
://coqui.gateway.scarf.sh/breton/itml/v0.1.0/Breton-digits-yesno.scorer', instal
led=False, acoustic_path=None, scorer_path=None), ModelCard(name='Polish STT v0.
0.1', language='Polish', version='v0.0.1', creator='Jaco-Assistant', acoustic='h
ttps://coqui.gateway.scarf.sh/polish/jaco-assistant/v0.0.1/model.tflite', scorer
='https://coqui.gateway.scarf.sh/polish/jaco-assistant/v0.0.1/kenlm_pl.scorer', 
installed=False, acoustic_path=None, scorer_path=None), ModelCard(name='English 
STT v1.0.0-huge-vocab', language='English', version='v1.0.0-huge-vocab', creator
='Coqui', acoustic='https://coqui.gateway.scarf.sh/english/coqui/v1.0.0-huge-voc
ab/model.tflite', scorer='https://coqui.gateway.scarf.sh/english/coqui/v1.0.0-hu
ge-vocab/huge-vocabulary.scorer', installed=False, acoustic_path=None, scorer_pa
th=None), ModelCard(name='Russian STT v0.1.0', language='Russian', version='v0.1
.0', creator='Joe Meyer', acoustic='https://coqui.gateway.scarf.sh/russian/jemey
er/v0.1.0/model.tflite', scorer='https://coqui.gateway.scarf.sh/russian/jemeyer/
v0.1.0/wiki-ru-6gram.scorer', installed=False, acoustic_path=None, scorer_path=N
one)])

We can :

  1. Use some repr to make the print prettier
  2. Add a logger to lower this output to debug level only.

Change STT dependency scheme

Either we :

  • support all versions of STT below 2.0 (to avoid updating version number every time) or we
  • sync releases with STT to enable the users to use the STT version that suits their projects,
    but we can't be stuck on 1.0.0...

In my case I want to use the latest stable version of STT (1.3.0).

❯ pip install coqui_stt_model_manager
Defaulting to user installation because normal site-packages is not writeable
Collecting coqui_stt_model_manager
  Using cached coqui_stt_model_manager-0.0.18-py3-none-any.whl (599 kB)
Collecting Flask-Cors==3.0.10
  Using cached Flask_Cors-3.0.10-py2.py3-none-any.whl (14 kB)
Collecting Flask==2.0.1
  Using cached Flask-2.0.1-py3-none-any.whl (94 kB)
Requirement already satisfied: webrtcvad==2.0.10 in /home/waser/.local/lib/python3.10/site-packages (from coqui_stt_model_manager) (2.0.10)
Collecting pyxdg==0.27
  Using cached pyxdg-0.27-py2.py3-none-any.whl (49 kB)
Collecting Jinja2==3.0.1
  Using cached Jinja2-3.0.1-py3-none-any.whl (133 kB)
Collecting coqpit==0.0.9
  Using cached coqpit-0.0.9.tar.gz (16 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting coqui_stt_model_manager
  Using cached coqui_stt_model_manager-0.0.17-py3-none-any.whl (599 kB)
  Using cached coqui_stt_model_manager-0.0.16-py3-none-any.whl (599 kB)
  Using cached coqui_stt_model_manager-0.0.15-py3-none-any.whl (599 kB)
  Using cached coqui_stt_model_manager-0.0.14-py3-none-any.whl (599 kB)
  Using cached coqui_stt_model_manager-0.0.12-py3-none-any.whl (620 kB)
  Using cached coqui_stt_model_manager-0.0.11-py3-none-any.whl (620 kB)
  Using cached coqui_stt_model_manager-0.0.10-py3-none-any.whl (620 kB)
  Using cached coqui_stt_model_manager-0.0.9-py3-none-any.whl (620 kB)
  Using cached coqui_stt_model_manager-0.0.8-py3-none-any.whl (1.2 MB)
ERROR: Cannot install coqui-stt-model-manager==0.0.10, coqui-stt-model-manager==0.0.11, coqui-stt-model-manager==0.0.12, coqui-stt-model-manager==0.0.14, coqui-stt-model-manager==0.0.15, coqui-stt-model-manager==0.0.16, coqui-stt-model-manager==0.0.17, coqui-stt-model-manager==0.0.18, coqui-stt-model-manager==0.0.8 and coqui-stt-model-manager==0.0.9 because these package versions have conflicting dependencies.

The conflict is caused by:
    coqui-stt-model-manager 0.0.18 depends on stt==1.0.0
    coqui-stt-model-manager 0.0.17 depends on stt==0.10.0a13
    coqui-stt-model-manager 0.0.16 depends on stt==0.10.0a13
    coqui-stt-model-manager 0.0.15 depends on stt==0.10.0a13
    coqui-stt-model-manager 0.0.14 depends on stt==0.10.0a13
    coqui-stt-model-manager 0.0.12 depends on stt==0.10.0a6
    coqui-stt-model-manager 0.0.11 depends on stt==0.10.0a6
    coqui-stt-model-manager 0.0.10 depends on stt==0.10.0a6
    coqui-stt-model-manager 0.0.9 depends on stt==0.10.0a6
    coqui-stt-model-manager 0.0.8 depends on stt==0.10.0a6

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Install errror

After following the install instructions and providing my email I get the following error

image

Python 3.10 (and thus also Arm Macs) not supported?

The universal (Arm-compatible) version of stt is only available for python 3.10, while attempting to install this from pypi for python 3.10 fails with the error ERROR: Cannot install coqui-stt-model-manager==0.0.10, coqui-stt-model-manager==0.0.11, coqui-stt-model-manager==0.0.12, coqui-stt-model-manager==0.0.14, coqui-stt-model-manager==0.0.15, coqui-stt-model-manager==0.0.16, coqui-stt-model-manager==0.0.17, coqui-stt-model-manager==0.0.18, coqui-stt-model-manager==0.0.8 and coqui-stt-model-manager==0.0.9 because these package versions have conflicting dependencies.

and from attempting to build and install from source using "make install" from a fresh clone fails with the error ERROR: Package 'coqui-stt-model-manager' requires a different Python: 3.10.2 not in '<3.10,>=3.6'

Install error in Safari - XMLHttpRequest cannot load http://127.0.0.1:38450/install_model due to access control checks

I'm getting same error as issue #15, Safari on macos is refusing to allow access to the server, which is running. I cleared the Safari settings for the site and the local server URL to both not do content blocking, but that doesn't seem to matter. I would rather not install Chrome, or any other browser, just to load models, is there an alternative method for getting the models to the server that doesn't use a browser?

The browser console shows this, with the correct local server:

xhr.js:184[blocked] The page at https://coqui.ai/english/coqui/v1.0.0-large-vocab?callback_url=http://127.0.0.1:38450/install_model&name=English%20STT%20v1.0.0-large-vocab&prefer_tflite=1#download was not allowed to display insecure content from http://127.0.0.1:38450/install_model.
xhr.js:184 Not allowed to request resource
xhr.js:184 [Error] XMLHttpRequest cannot load http://127.0.0.1:38450/install_model due to access control checks.
(anonymous function) 

Add local model

add a way to install a local model to the STT Model Manager from a checkpoint folder or from TFLite + Scorer files

currently, you have to go through the model zoo, or manually hack the json file + dir structure to add a local model

Clean webpack logs

Webpack logs are underwhelming by default. Prior to v0.0.21 of the model manager, we tapped the logs using a custom hook to control the flow of logs. Unfortunately since the upgrade, the logs are not filtered anymore.

See #47 (comment) and #47 (comment)

AttributeError: 'NoneType' when models.json exist but none is installed

❯ stt-model-manager --debug
Installed models: ModelIndex(models=[ModelCard(name='French STT v0.9', language='French', version='v0.9', creator='commonvoice-fr', acoustic='https://coqui.gateway.scarf.sh/french/commonvoice-fr/v0.9/model.tflite', scorer='https://coqui.gateway.scarf.sh/french/commonvoice-fr/v0.9/kenlm.scorer', installed=False, acoustic_path=None, scorer_path=None), ModelCard(name='Welsh STT v21.03', language='Welsh', version='v21.03', creator='Dewi Bryn Jones', acoustic='https://coqui.gateway.scarf.sh/welsh/techiaith/v21.03/model.tflite', scorer='https://coqui.gateway.scarf.sh/welsh/techiaith/v21.03/techiaith_bangor_transcribe_21.03.scorer', installed=False, acoustic_path=None, scorer_path=None), ModelCard(name='Catalan STT v0.14.0', language='Catalan', version='v0.14.0', creator="Ciaran O'Reilly", acoustic='https://coqui.gateway.scarf.sh/catalan/ccoreilly/v0.14.0/model.tflite', scorer='https://coqui.gateway.scarf.sh/catalan/ccoreilly/v0.14.0/kenlm-aina-3-p10.scorer', installed=False, acoustic_path=None, scorer_path=None), ModelCard(name='Ukrainian STT v0.4', language='Ukrainian', version='v0.4', creator='Yurii Paniv', acoustic='https://coqui.gateway.scarf.sh/ukrainian/robinhad/v0.4/model.tflite', scorer='https://coqui.gateway.scarf.sh/ukrainian/robinhad/v0.4/kenlm.scorer', installed=False, acoustic_path=None, scorer_path=None), ModelCard(name='German STT v0.9.0', language='German', version='v0.9.0', creator='Aashish Agarwal', acoustic='https://coqui.gateway.scarf.sh/german/AASHISHAG/v0.9.0/model.tflite', scorer='https://coqui.gateway.scarf.sh/german/AASHISHAG/v0.9.0/de-aashishag-1-prune-kenlm.scorer', installed=False, acoustic_path=None, scorer_path=None), ModelCard(name='Italian STT 2020.8.7', language='Italian', version='2020.8.7', creator='Mozilla Italia', acoustic='https://coqui.gateway.scarf.sh/italian/mozillaitalia/2020.8.7/model.tflite', scorer='https://coqui.gateway.scarf.sh/italian/mozillaitalia/2020.8.7/it-mzit-1-prune-kenlm.scorer', installed=False, acoustic_path=None, scorer_path=None), ModelCard(name='Greek STT v0.1.0', language='Greek', version='v0.1.0', creator='ITML', acoustic='https://coqui.gateway.scarf.sh/greek/itml/v0.1.0/model.tflite', scorer='https://coqui.gateway.scarf.sh/greek/itml/v0.1.0/Greek-digits-yesno.scorer', installed=False, acoustic_path=None, scorer_path=None), ModelCard(name='Irish STT v0.1.1', language='Irish', version='v0.1.1', creator='ITML', acoustic='https://coqui.gateway.scarf.sh/irish/itml/v0.1.1/model.tflite', scorer='https://coqui.gateway.scarf.sh/irish/itml/v0.1.1/Irish-digits-yesno.scorer', installed=False, acoustic_path=None, scorer_path=None), ModelCard(name='Breton STT v0.1.0', language='Breton', version='v0.1.0', creator='ITML', acoustic='https://coqui.gateway.scarf.sh/breton/itml/v0.1.0/model.tflite', scorer='https://coqui.gateway.scarf.sh/breton/itml/v0.1.0/Breton-digits-yesno.scorer', installed=False, acoustic_path=None, scorer_path=None), ModelCard(name='Polish STT v0.0.1', language='Polish', version='v0.0.1', creator='Jaco-Assistant', acoustic='https://coqui.gateway.scarf.sh/polish/jaco-assistant/v0.0.1/model.tflite', scorer='https://coqui.gateway.scarf.sh/polish/jaco-assistant/v0.0.1/kenlm_pl.scorer', installed=False, acoustic_path=None, scorer_path=None), ModelCard(name='English STT v1.0.0-huge-vocab', language='English', version='v1.0.0-huge-vocab', creator='Coqui', acoustic='https://coqui.gateway.scarf.sh/english/coqui/v1.0.0-huge-vocab/model.tflite', scorer='https://coqui.gateway.scarf.sh/english/coqui/v1.0.0-huge-vocab/huge-vocabulary.scorer', installed=False, acoustic_path=None, scorer_path=None), ModelCard(name='Russian STT v0.1.0', language='Russian', version='v0.1.0', creator='Joe Meyer', acoustic='https://coqui.gateway.scarf.sh/russian/jemeyer/v0.1.0/model.tflite', scorer='https://coqui.gateway.scarf.sh/russian/jemeyer/v0.1.0/wiki-ru-6gram.scorer', installed=False, acoustic_path=None, scorer_path=None)])
Traceback (most recent call last):
  File "/home/waser/.local/bin/stt-model-manager", line 8, in <module>
    sys.exit(main())
  File "/home/waser/.local/lib/python3.10/site-packages/coqui_stt_model_manager/__main__.py", line 13, in main
    app = build_app()
  File "/home/waser/.local/lib/python3.10/site-packages/coqui_stt_model_manager/server.py", line 278, in build_app
    app.config["MODEL_MANAGER"].maybe_upgrade_protobuf()
  File "/home/waser/.local/lib/python3.10/site-packages/coqui_stt_model_manager/modelmanager.py", line 280, in maybe_upgrade_protobuf
    pbmm_models = [
  File "/home/waser/.local/lib/python3.10/site-packages/coqui_stt_model_manager/modelmanager.py", line 281, in <listcomp>
    m for m in self.list_models() if m.acoustic_path.endswith(".pbmm")
AttributeError: 'NoneType' object has no attribute 'endswith'

Renaming of POSTed JSON parameters

Could we rename the POSTed parameters from

{
        "name": "test_model",
        "language": "english",
        "version": "0.0.1",
        "creator": "reuben",
        "acoustic": "https://github.com/coqui-ai/STT-models/releases/download/english/coqui/v0.9.3/model.pbmm",
        "scorer": "https://github.com/coqui-ai/STT/releases/download/v0.9.3/coqui-stt-0.9.3-models.scorer"
}

to

{
        "name": "test_model",
        "language": "english",
        "modelVersion": "0.0.1",
        "modelCreator": "reuben",
        "acousticModelURL": "https://github.com/coqui-ai/STT-models/releases/download/english/coqui/v0.9.3/model.pbmm",
        "scorerURL": "https://github.com/coqui-ai/STT/releases/download/v0.9.3/coqui-stt-0.9.3-models.scorer"
}

Just to be more specific, as there are model versions and code version, code creators and model creators, and "acoustic" isn't the model but its URL similarly for "scorer".

Also as a suggestion we should also add the code version too, e.g. something like

{
        ...
        "codeVersion": "0.9.3",
        ...
}

to help with future proofing things.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.