Remove unshipped sherpa provider compatibility aliases
This commit is contained in:
@@ -85,9 +85,7 @@ function parseSpeechProviderId(value: unknown): "openai" | "local" | null {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (normalized === "openai") return "openai";
|
if (normalized === "openai") return "openai";
|
||||||
if (normalized === "sherpa" || normalized === "sherpa-onnx" || normalized === "local") {
|
if (normalized === "local") return "local";
|
||||||
return "local";
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,11 +51,7 @@ const SpeechProviderIdSchema = z.preprocess(
|
|||||||
if (typeof value !== "string") {
|
if (typeof value !== "string") {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
const normalized = value.trim().toLowerCase();
|
return value.trim().toLowerCase();
|
||||||
if (normalized === "sherpa" || normalized === "sherpa-onnx") {
|
|
||||||
return "local";
|
|
||||||
}
|
|
||||||
return normalized;
|
|
||||||
},
|
},
|
||||||
z.enum(["openai", "local"])
|
z.enum(["openai", "local"])
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user