2024-07-26 13:35:50 +02:00
|
|
|
// Currently disabled on non-Android platforms
|
2023-05-27 17:30:25 +02:00
|
|
|
|
2024-04-05 13:16:49 +02:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
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) => {
|
2024-04-05 13:16:49 +02:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
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;
|