diff --git a/Documentation.md b/Documentation.md index 04109c7..a43761e 100644 --- a/Documentation.md +++ b/Documentation.md @@ -9,7 +9,7 @@ | Function/Object | Description | |-|-| | ```Promise createModel(url: string, path: string, id: string)```

```Promise createSpkModel(url: string, path: string, id: string)``` | Create a ```Model``` or ```SpkModel```, model files must be directly under the model root, and compressed model must be in ```.tar.gz```/```.tgz``` format. Tar format must be USTAR. If:
- ```path``` contains valid model files and ```id``` is the same, there will not be a fetch from ```url```.
- ```path``` doesn't contain valid model files, or if it contains valid model files but ```id``` is different, there will be a fetch from ```url```, and the model is stored with ```id```. Models are thread-safe and reusable across recognizers. | -| ```Promise createRecognizer(model: Model, sampleRate: float)```

```Promise createRecognizerWithSpkModel(model: Model, spkModel: spkModel, sampleRate: float)```

```Promise createRecognizerWithGrm(model: Model, grammar: string, sampleRate: float)``` | Create a ```Recognizer``` | +| ```Promise createRecognizer(model: Model, sampleRate: float)```

```Promise createRecognizerWithSpkModel(model: Model, sampleRate: float, spkModel: spkModel)```

```Promise createRecognizerWithGrm(model: Model, grammar: string, sampleRate: float)``` | Create a ```Recognizer``` | | ```setLogLevel(lvl: int)``` | Set log level for Kaldi messages (default: ```0```: Info)
```-2```: Error
```-1```: Warning
```1```: Verbose
```2```: More verbose
```3```: Debug | | ```Promise createTransferer(ctx: AudioContext, bufferSize: int)``` | Create a node that transfer its inputs back to the main thread with custom buffer size (must be multiple of 128). Its port's ```onmessage``` handler can be set to get audio data. Has 1 input with 1 channel and no output. The the higher the size, the lesser the audio breaks up, but the higher the latency. Recomended value is around ```128 * 150```. | | ```Promise cleanUp()``` | A convenience function that call ```delete()``` on all objects and revoke all URLs. **Run this when you're done!** | @@ -74,4 +74,4 @@ cd Vosklet/src && | INITIAL_MEMORY | Set inital memory, valid suffixes: kb, mb, gb, tb or none (bytes) | ```315mb``` as [recommended](https://alphacephei.com/vosk/models) plus a bit of leeway. This memory will grow if usage exceeds this value. | | MAX_THREADS | Set the max number of threads (>=1), this should be equal to the number of recognizers used in the program | ```1``` | | JOBS | Set the number of jobs (threads) when building | ```$(nproc)``` | -| EMSDK | Set EMSDK's path (will install EMSDK in root folder if unset) | ```../emsdk``` | \ No newline at end of file +| EMSDK | Set EMSDK's path (will install EMSDK in root folder if unset) | ```../emsdk``` | diff --git a/Examples/x-vector.html b/Examples/x-vector.html new file mode 100644 index 0000000..3726947 --- /dev/null +++ b/Examples/x-vector.html @@ -0,0 +1,94 @@ + + + + + + + + + +