Following this issue
opened 03:40PM - 04 Nov 19 UTC
closed 03:44PM - 04 Nov 19 UTC
Hello.
I use javascript for running simple example from https://github.com/mozi… lla/DeepSpeech/tree/master/examples/nodejs_wav
I change dependencies:
1. use deepspeech==0.5.1 instead of ^0.6.0-alpha.11
2. download relevant models by command and extract them in folder models.
But running
`const DeepSpeech = require('deepspeech');`
`const BEAM_WIDTH = 1024;`
`let modelPath = './models/output_graph.pbmm';`
`let alphabetPath = './models/alphabet.txt';`
`let model = new DeepSpeech.Model(modelPath, alphabetPath, BEAM_WIDTH);`
Give me the error:
TypeError: DeepSpeech.Model is not a constructor
at Object.<anonymous> (/home/yhontarenko/PycharmProjects/DeepSpeech/node_modules/deepspeech/index.js:12:13)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/yhontarenko/PycharmProjects/DeepSpeech/index.js:1:82)
at Module._compile (module.js:652:30)
All libraries were installed like in instruction with npm. What is wrong?
Ask an advice: how I can must use deepspeech API of version 0.5.1? Can anyone give example?
I can`t use newer version of API (more than 0.5.1) because I want use pretrained models and models 0.5.1 is latest.
lissyx
((slow to reply) [NOT PROVIDING SUPPORT])
November 4, 2019, 7:02pm
2
The best example for 0.5 is looking at native_client/deepspeech.h
and native_client/javascript/client.js
.
Newer versions have https://deepspeech.readthedocs.io/en/latest/NodeJS-API.html
(which I just noticed we forgot to update)
Okay, thank you for answer.