2023-05-27 17:30:25 +02:00
|
|
|
// Currently disabled on iOS
|
|
|
|
|
2023-05-07 13:05:41 +02:00
|
|
|
type Vosk = any;
|
|
|
|
|
|
|
|
export { Vosk };
|
|
|
|
|
2023-06-02 16:44:00 +02:00
|
|
|
interface StartOptions {
|
|
|
|
onResult: (text: string)=> void;
|
|
|
|
}
|
|
|
|
|
2023-05-07 13:05:41 +02:00
|
|
|
export interface Recorder {
|
|
|
|
stop: ()=> Promise<string>;
|
|
|
|
cleanup: ()=> void;
|
|
|
|
}
|
|
|
|
|
2023-06-13 19:06:54 +02:00
|
|
|
export const isSupportedLanguage = (_locale: string) => {
|
|
|
|
return false;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const modelIsDownloaded = async (_locale: string) => {
|
|
|
|
return false;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const getVosk = async (_locale: string) => {
|
2023-05-07 13:05:41 +02:00
|
|
|
return {} as any;
|
|
|
|
};
|
|
|
|
|
2023-06-02 16:44:00 +02:00
|
|
|
export const startRecording = (_vosk: Vosk, _options: StartOptions): Recorder => {
|
2023-05-07 13:05:41 +02:00
|
|
|
return {
|
|
|
|
stop: async () => { return ''; },
|
|
|
|
cleanup: () => {},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export const voskEnabled = false;
|