Skip to content
Source
Sign inSign up

platform.ts

18 lines385 Bytes

1const SUPPORTED_PLATFORMS = new Set([
2 "darwin-arm64",
3 "darwin-x64",
4 "win32-x64",
5 "linux-x64",
6 "linux-arm64",
7]);
8​
9export function isSpeechPlatformSupported(
10 platform: string,
11 architecture: string,
12 libc: "gnu" | "musl" | undefined,
13): boolean {
14 return (
15 (platform !== "linux" || libc === "gnu") &&
16 SUPPORTED_PLATFORMS.has(`${platform}-${architecture}`)
17 );