@vkontakte/calls-audio-effects 1.4.0 → 1.4.2-dev.4a2ab040.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/audio-effects.cjs.js +5406 -7
- package/audio-effects.esm.js +5396 -7
- package/controllers/VadController.d.ts +3 -0
- package/package.json +2 -2
- package/utils/ModelLoader.d.ts +11 -0
|
@@ -4,6 +4,8 @@ export interface VadControllerOptions extends EffectVadAiOptions {
|
|
|
4
4
|
threshold?: number;
|
|
5
5
|
/** How many ms after last "speech" to keep enabled=true. Default: 300 */
|
|
6
6
|
hangoverMs?: number;
|
|
7
|
+
/** Log changes to the isSpeaking state. Default: false */
|
|
8
|
+
logSpeakingState?: boolean;
|
|
7
9
|
}
|
|
8
10
|
export interface VadLib {
|
|
9
11
|
VadController: typeof VadController;
|
|
@@ -14,6 +16,7 @@ export declare class VadController {
|
|
|
14
16
|
private _vadInputTrack;
|
|
15
17
|
private _threshold;
|
|
16
18
|
private _hangoverMs;
|
|
19
|
+
private _logSpeakingState;
|
|
17
20
|
private _effectOptions;
|
|
18
21
|
private _isSpeaking;
|
|
19
22
|
private _lastSpeechAt;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/calls-audio-effects",
|
|
3
|
-
"version": "1.4.0",
|
|
3
|
+
"version": "1.4.2-dev.4a2ab040.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Audio effects library for video calls based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"**/*.d.ts"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@vkontakte/audio-processing": "0.0.
|
|
17
|
+
"@vkontakte/audio-processing": "0.0.10-dev.ed6a3323",
|
|
18
18
|
"onnxruntime-web": "^1.26.0"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import wav2lip from '@vkontakte/audio-processing';
|
|
2
|
+
/**
|
|
3
|
+
* Скачивает файл модели и кладёт его в файловую систему wasm-модуля.
|
|
4
|
+
* Должен быть вызван до создания алгоритма, который читает модель.
|
|
5
|
+
*/
|
|
6
|
+
export declare function loadModelFile(module: wav2lip.Wav2lipModule, urlResolver: (url: string) => string, fileName: string): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Удаляет файл модели из файловой системы wasm-модуля.
|
|
9
|
+
* Созданный алгоритм хранит веса у себя, файл ему больше не нужен.
|
|
10
|
+
*/
|
|
11
|
+
export declare function unloadModelFile(module: wav2lip.Wav2lipModule, fileName: string): void;
|