Update README
Signed-off-by: Anas Abou Allaban <aabouallaban@pm.me>
This commit is contained in:
parent
be40b07307
commit
510d71353f
@ -11,3 +11,19 @@ To generate a new `index.d.ts` type declaration file, run:
|
||||
npm install -g dts-gen
|
||||
dts-gen --module deepspeech --file index.d.ts
|
||||
```
|
||||
|
||||
### Example usage
|
||||
|
||||
```javascript
|
||||
/// index.ts
|
||||
import DeepSpeech from "deepspeech";
|
||||
|
||||
let modelPath = '/path/to/model';
|
||||
let model = new DeepSpeech.Model(modelPath);
|
||||
model.setBeamWidth(1000);
|
||||
|
||||
let audioBuffer = ...;
|
||||
model.sttWithMetadata(audioBuffer);
|
||||
|
||||
FreeModel(model);
|
||||
```
|
||||
|
@ -13,6 +13,6 @@
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"index.d.ts"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user