Skip to content

Commit

Permalink
update documentation (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricky0123 authored Dec 2, 2024
1 parent 5b88673 commit 4cfb831
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/user-guide/algorithm.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ All of the main APIs accept certain common configuration parameters that modify
* `positiveSpeechThreshold: number` - determines the threshold over which a probability is considered to indicate the presence of speech.
* `negativeSpeechThreshold: number` - determines the threshold under which a probability is considered to indicate the absence of speech.
* `redemptionFrames: number` - number of speech-negative frames to wait before ending a speech segment.
* `frameSamples: number` - the size of a frame in samples - 1536 by default and probably should not be changed.
* `frameSamples: number` - the size of a frame in samples. For the older (default) Silero model, this should probably be 1536. For the new, Silero version 5 model, it should be 512.
* `preSpeechPadFrames: number` - number of audio frames to prepend to a speech segment.
* `minSpeechFrames: number` - minimum number of speech-positive frames for a speech segment.
6 changes: 3 additions & 3 deletions docs/user-guide/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ The `MicVAD` API is for recording user audio in the browser and running callback
| Package | Supported |
| ---------------------- | ---------------------------------------------- |
| `@ricky0123/vad-web` | Yes |
| `@ricky0123/vad-node` | No |
| `@ricky0123/vad-react` | No, use the [useMicVAD](api.md#usemicvad) hook |

### Example
Expand Down Expand Up @@ -39,6 +38,9 @@ New instances of `MicVAD` are created by calling the async static method `MicVAD
| `frameSamples` | `number` | [see algorithm configuration](algorithm.md#configuration) |
| `preSpeechPadFrames` | `number` | [see algorithm configuration](algorithm.md#configuration) |
| `minSpeechFrames` | `number` | [see algorithm configuration](algorithm.md#configuration) |
| `model` | `"v5" or "legacy"` (default `"legacy"`) | whether to use the new Silero model or not |
| `baseAssetPath` | `string`) | URL or path relative to webroot where `vad.worklet.bundle.min.js`, `silero_vad_legacy.onnx`, and `silero_vad_v5.onnx` will be loaded from |
| `onnxWASMBasePath` | `string`) | URL or path relative to webroot where wasm files for onnxruntime-web will be loaded from |

### Attributes
| Attributes | Type | Description |
Expand All @@ -55,7 +57,6 @@ The `NonRealTimeVAD` API is for identifying segments of user speech if you alrea
| Package | Supported |
| ---------------------- | --------- |
| `@ricky0123/vad-web` | Yes |
| `@ricky0123/vad-node` | Yes |
| `@ricky0123/vad-react` | No |

### Example
Expand Down Expand Up @@ -98,7 +99,6 @@ A React hook wrapper for [MicVAD](api.md#micvad). Use this if you want to run th
| Package | Supported |
| ---------------------- | ------------------------------- |
| `@ricky0123/vad-web` | No, use [MicVAD](api.md#micvad) |
| `@ricky0123/vad-node` | No |
| `@ricky0123/vad-react` | Yes |

### Example
Expand Down

0 comments on commit 4cfb831

Please sign in to comment.