Update README

Signed-off-by: Anas Abou Allaban <aabouallaban@pm.me>
This commit is contained in:
Anas Abou Allaban 2020-04-01 15:17:13 -04:00 committed by Alexandre Lissy
parent be40b07307
commit 510d71353f
2 changed files with 17 additions and 1 deletions

View File

@ -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);
```

View File

@ -13,6 +13,6 @@
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"index.d.ts"
]
}