Skip to content

Commit df80b81

Browse files
Merge the Moonshine catalog correction into mobile dictation
2 parents 325e7ff + f79c7fb commit df80b81

3 files changed

Lines changed: 16 additions & 181 deletions

File tree

‎apps/server/scripts/speech-catalog.test.ts‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ it("reproduces the bundled registry byte for byte without upstream requests", as
3535
}
3636
});
3737

38-
it("filters roles, explicit NC licenses, future engines, unknown architectures and unsupported files", () => {
38+
it("filters restricted licenses, unsupported roles, engines, architectures and files", () => {
3939
const model = catalog.models[0]!;
4040
for (const override of [
4141
{ role: "langid" as const },
@@ -63,6 +63,17 @@ it("filters roles, explicit NC licenses, future engines, unknown architectures a
6363
for (const license of ["other", "apache-2.0", "cc-by-4.0", "cc-by-sa-4.0", "unlicense"]) {
6464
expect(generate([{ ...model, license, minEngine: "0.4.1" }]).models).toHaveLength(1);
6565
}
66+
const moonshine = catalog.models.find((entry) => entry.id === "moonshine-tiny-ja")!;
67+
for (const [id, allowed] of [
68+
["moonshine-tiny-ja", false],
69+
["moonshine-base-vi", false],
70+
["moonshine-base-es", false],
71+
["moonshine-base", true],
72+
["moonshine-streaming-tiny-ja", true],
73+
] as const) {
74+
const entry = { ...moonshine, id, repository: `handy-computer/${id}-gguf`, license: "mit" };
75+
expect(generate([entry]).models, id).toHaveLength(allowed ? 1 : 0);
76+
}
6677
});
6778

6879
it("rejects missing defaults, unpinned or corrupt metadata, collisions, and unreviewed engine/schema changes", () => {

‎apps/server/scripts/speech-catalog.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ const RECOMMENDED = new Set([
3737
"whisper-medium",
3838
]);
3939

40+
// Handy labels these weights MIT; Moonshine lists them under its Community License at https://huggingface.co/moonshine-ai/moonshine-models.
41+
const COMMUNITY_LICENSED_MOONSHINE = /^moonshine-(?:(?:base|tiny)-(?:ar|ja|ko|uk|vi|zh)|base-es)$/;
42+
4043
export function generateSpeechCatalog(
4144
data: CatalogData,
4245
sourceVersion: string,
@@ -51,6 +54,7 @@ export function generateSpeechCatalog(
5154
if (
5255
model.role !== "asr" ||
5356
/(?:^|[^a-z0-9])nc(?:$|[^a-z0-9])/i.test(model.license) ||
57+
COMMUNITY_LICENSED_MOONSHINE.test(model.id) ||
5458
!ASR_FAMILIES.has(model.family) ||
5559
compareEngineVersions(model.minEngine ?? data.transcribeCpp, engineVersion) > 0
5660
)

‎apps/server/src/speech/catalog.json‎

Lines changed: 0 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,96 +1161,6 @@
11611161
"supportsLanguageDetection": false,
11621162
"supportsTranslation": false
11631163
},
1164-
{
1165-
"id": "handy-computer/moonshine-base-ar-gguf",
1166-
"revision": "1ae85af52b16eac8bcebda0287e6195ed1956e86",
1167-
"name": "Moonshine Base Arabic",
1168-
"description": "Moonshine Base Arabic speech-to-text.",
1169-
"filename": "moonshine-base-ar-Q8_0.gguf",
1170-
"size": 77476480,
1171-
"sha256": "1a5b34653dfff0917d5bc7de1aeafca674162a5efa674472358d1b7f1644cf73",
1172-
"license": "mit",
1173-
"languages": ["ar"],
1174-
"recommended": false,
1175-
"supportsStreaming": false,
1176-
"supportsLanguageDetection": false,
1177-
"supportsTranslation": false
1178-
},
1179-
{
1180-
"id": "handy-computer/moonshine-base-ja-gguf",
1181-
"revision": "aac5cfff17ae28b6f17ae790a3e309ae0ca5911c",
1182-
"name": "Moonshine Base Japanese",
1183-
"description": "Moonshine Base Japanese speech-to-text.",
1184-
"filename": "moonshine-base-ja-Q8_0.gguf",
1185-
"size": 77476480,
1186-
"sha256": "8ee6e9d7c9df69a3ea654af77659f1c0c08bf90998c2e2a269826096ffafc4f0",
1187-
"license": "mit",
1188-
"languages": ["ja"],
1189-
"recommended": false,
1190-
"supportsStreaming": false,
1191-
"supportsLanguageDetection": false,
1192-
"supportsTranslation": false
1193-
},
1194-
{
1195-
"id": "handy-computer/moonshine-base-ko-gguf",
1196-
"revision": "03813c71abe85b40cd0671d3cfa420e831d7e333",
1197-
"name": "Moonshine Base Korean",
1198-
"description": "Moonshine Base Korean speech-to-text.",
1199-
"filename": "moonshine-base-ko-Q8_0.gguf",
1200-
"size": 77476480,
1201-
"sha256": "b430672cfdde98b894bd98adf1a8b3470308fea39ad1e6bb0f54d8fc9e114471",
1202-
"license": "mit",
1203-
"languages": ["ko"],
1204-
"recommended": false,
1205-
"supportsStreaming": false,
1206-
"supportsLanguageDetection": false,
1207-
"supportsTranslation": false
1208-
},
1209-
{
1210-
"id": "handy-computer/moonshine-base-uk-gguf",
1211-
"revision": "d6ec586909c5209c0c17243dc4f5e55164f85dfb",
1212-
"name": "Moonshine Base Ukrainian",
1213-
"description": "Moonshine Base Ukrainian speech-to-text.",
1214-
"filename": "moonshine-base-uk-Q8_0.gguf",
1215-
"size": 77476512,
1216-
"sha256": "6dcac8c3905706e8c8416f531a479eccaa38cdaf1eae439f776fda4d4faa88d3",
1217-
"license": "mit",
1218-
"languages": ["uk"],
1219-
"recommended": false,
1220-
"supportsStreaming": false,
1221-
"supportsLanguageDetection": false,
1222-
"supportsTranslation": false
1223-
},
1224-
{
1225-
"id": "handy-computer/moonshine-base-vi-gguf",
1226-
"revision": "76ccec93f5854ae16d2dab72d5b762fe10c0df81",
1227-
"name": "Moonshine Base Vietnamese",
1228-
"description": "Moonshine Base Vietnamese speech-to-text.",
1229-
"filename": "moonshine-base-vi-Q8_0.gguf",
1230-
"size": 77476512,
1231-
"sha256": "d382ec7ac6aa821d25b921ab982bf1bf29da591cad73372b65209c6a74decb36",
1232-
"license": "mit",
1233-
"languages": ["vi"],
1234-
"recommended": false,
1235-
"supportsStreaming": false,
1236-
"supportsLanguageDetection": false,
1237-
"supportsTranslation": false
1238-
},
1239-
{
1240-
"id": "handy-computer/moonshine-base-zh-gguf",
1241-
"revision": "64385c681d79767be73ce8591b4609854ac750c9",
1242-
"name": "Moonshine Base Chinese",
1243-
"description": "Moonshine Base Chinese speech-to-text.",
1244-
"filename": "moonshine-base-zh-Q8_0.gguf",
1245-
"size": 77476480,
1246-
"sha256": "1bae1d753b29b0c34038585b576d28e4f262ed10c6c7217e023fa5d624dc15ad",
1247-
"license": "mit",
1248-
"languages": ["zh"],
1249-
"recommended": false,
1250-
"supportsStreaming": false,
1251-
"supportsLanguageDetection": false,
1252-
"supportsTranslation": false
1253-
},
12541164
{
12551165
"id": "handy-computer/moonshine-streaming-medium-gguf",
12561166
"revision": "c722a9455a40a1844c3d25267dc84eff61d8dd84",
@@ -1311,96 +1221,6 @@
13111221
"supportsLanguageDetection": false,
13121222
"supportsTranslation": false
13131223
},
1314-
{
1315-
"id": "handy-computer/moonshine-tiny-ar-gguf",
1316-
"revision": "2360cb6893cb523da51875eaffc8050d2ca7b56d",
1317-
"name": "Moonshine Tiny Arabic",
1318-
"description": "Moonshine Tiny Arabic speech-to-text.",
1319-
"filename": "moonshine-tiny-ar-Q8_0.gguf",
1320-
"size": 35466944,
1321-
"sha256": "e0bfa7c3aad2fe7acce022566daa1bb6140b6b263ba79655241acec7f7e0000b",
1322-
"license": "mit",
1323-
"languages": ["ar"],
1324-
"recommended": false,
1325-
"supportsStreaming": false,
1326-
"supportsLanguageDetection": false,
1327-
"supportsTranslation": false
1328-
},
1329-
{
1330-
"id": "handy-computer/moonshine-tiny-ja-gguf",
1331-
"revision": "627aae63193d6c47cbdf316346119dcdc65d9b0d",
1332-
"name": "Moonshine Tiny Japanese",
1333-
"description": "Moonshine Tiny Japanese speech-to-text.",
1334-
"filename": "moonshine-tiny-ja-Q8_0.gguf",
1335-
"size": 35466944,
1336-
"sha256": "b47da12b2238cd176d9deebf31d49803c9eb4e99de5fd3abf672b4c0e2773c26",
1337-
"license": "mit",
1338-
"languages": ["ja"],
1339-
"recommended": false,
1340-
"supportsStreaming": false,
1341-
"supportsLanguageDetection": false,
1342-
"supportsTranslation": false
1343-
},
1344-
{
1345-
"id": "handy-computer/moonshine-tiny-ko-gguf",
1346-
"revision": "b858a303948b69c8b2442f700e936a07ba5f64da",
1347-
"name": "Moonshine Tiny Korean",
1348-
"description": "Moonshine Tiny Korean speech-to-text.",
1349-
"filename": "moonshine-tiny-ko-Q8_0.gguf",
1350-
"size": 35466944,
1351-
"sha256": "3ffe3340ceed10843789e2f7bf580097213c97a3537cae7031dbfe2a409b36b7",
1352-
"license": "mit",
1353-
"languages": ["ko"],
1354-
"recommended": false,
1355-
"supportsStreaming": false,
1356-
"supportsLanguageDetection": false,
1357-
"supportsTranslation": false
1358-
},
1359-
{
1360-
"id": "handy-computer/moonshine-tiny-uk-gguf",
1361-
"revision": "b4c991eb4223caa4de770843185476b0c86056b4",
1362-
"name": "Moonshine Tiny Ukrainian",
1363-
"description": "Moonshine Tiny Ukrainian speech-to-text.",
1364-
"filename": "moonshine-tiny-uk-Q8_0.gguf",
1365-
"size": 35466944,
1366-
"sha256": "61c372f6d99cce6c7b7c45626a51a6c935217368e715d9c4e036ce85f4496338",
1367-
"license": "mit",
1368-
"languages": ["uk"],
1369-
"recommended": false,
1370-
"supportsStreaming": false,
1371-
"supportsLanguageDetection": false,
1372-
"supportsTranslation": false
1373-
},
1374-
{
1375-
"id": "handy-computer/moonshine-tiny-vi-gguf",
1376-
"revision": "d97be0111a74a9058689beacc05b38969d2b68aa",
1377-
"name": "Moonshine Tiny Vietnamese",
1378-
"description": "Moonshine Tiny Vietnamese speech-to-text.",
1379-
"filename": "moonshine-tiny-vi-Q8_0.gguf",
1380-
"size": 35466944,
1381-
"sha256": "a42a80ef2e3636104aa2aff87cdde3e251e319e7d0d1acb3fb594cc601d8b95f",
1382-
"license": "mit",
1383-
"languages": ["vi"],
1384-
"recommended": false,
1385-
"supportsStreaming": false,
1386-
"supportsLanguageDetection": false,
1387-
"supportsTranslation": false
1388-
},
1389-
{
1390-
"id": "handy-computer/moonshine-tiny-zh-gguf",
1391-
"revision": "2aca379ba0dc978d878b84b76231d5ba5550e738",
1392-
"name": "Moonshine Tiny Chinese",
1393-
"description": "Moonshine Tiny Chinese speech-to-text.",
1394-
"filename": "moonshine-tiny-zh-Q8_0.gguf",
1395-
"size": 35466944,
1396-
"sha256": "95387abe90625410f8e2bcec43faaaadc0d92ef1e721117eb8a69cd31a7ef692",
1397-
"license": "mit",
1398-
"languages": ["zh"],
1399-
"recommended": false,
1400-
"supportsStreaming": false,
1401-
"supportsLanguageDetection": false,
1402-
"supportsTranslation": false
1403-
},
14041224
{
14051225
"id": "handy-computer/moss-transcribe-diarize-gguf",
14061226
"revision": "6fdfa33aed776bbb0ac11a1a9835634fe6d75dd7",

0 commit comments

Comments
 (0)