@senad-d/micme 0.2.0 → 0.3.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/CHANGELOG.md +3 -0
- package/README.md +33 -11
- package/SECURITY.md +3 -3
- package/micme.example.json +5 -2
- package/micme.schema.json +48 -4
- package/package.json +17 -6
- package/scripts/check-package-contents.mjs +1 -0
- package/scripts/doctor.mjs +92 -0
- package/src/audio.ts +64 -21
- package/src/backends.ts +249 -0
- package/src/config.ts +80 -12
- package/src/constants.ts +3 -1
- package/src/extension.ts +27 -28
- package/src/models.ts +100 -9
- package/src/recording-dir.ts +54 -0
- package/src/settings.ts +237 -69
- package/src/transcription.ts +32 -48
- package/src/types.ts +27 -0
package/src/types.ts
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
import type { ChildProcess } from "node:child_process";
|
|
2
2
|
|
|
3
3
|
export type TranscriptionMode = "clip" | "stream";
|
|
4
|
+
export type TranscribeBackend = "auto" | "whisper.cpp" | "python" | "custom";
|
|
5
|
+
export type EffectiveBackend = "whisper.cpp" | "python" | "custom" | "none";
|
|
6
|
+
export type WhisperCppModelSource = "explicit-path" | "configured-name" | "default-name";
|
|
7
|
+
export type TranscriptionModelSource = WhisperCppModelSource | "python-name" | "custom-command";
|
|
8
|
+
|
|
9
|
+
export type ResolvedWhisperCppModel = {
|
|
10
|
+
path: string;
|
|
11
|
+
modelName?: string;
|
|
12
|
+
source: WhisperCppModelSource;
|
|
13
|
+
configuredValue?: string;
|
|
14
|
+
exists: boolean;
|
|
15
|
+
downloadable: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type ResolvedTranscriptionPlan = {
|
|
19
|
+
requestedBackend: TranscribeBackend;
|
|
20
|
+
effectiveBackend: EffectiveBackend;
|
|
21
|
+
reason: string;
|
|
22
|
+
command?: string;
|
|
23
|
+
binary?: string;
|
|
24
|
+
modelName?: string;
|
|
25
|
+
modelPath?: string;
|
|
26
|
+
modelSource?: TranscriptionModelSource;
|
|
27
|
+
modelDownloadable?: boolean;
|
|
28
|
+
warnings: string[];
|
|
29
|
+
};
|
|
4
30
|
|
|
5
31
|
export type CommandSpec = {
|
|
6
32
|
command: string;
|
|
@@ -71,6 +97,7 @@ export type ModelCandidate = {
|
|
|
71
97
|
value: string;
|
|
72
98
|
description: string;
|
|
73
99
|
installed: boolean;
|
|
100
|
+
kind?: "model-name" | "path";
|
|
74
101
|
};
|
|
75
102
|
|
|
76
103
|
export type AudioDeviceCandidate = {
|