Skip to content

Commit b939736

Browse files
gitar-botPatrick Schlarmann
andcommitted
fix: fall back to own transcription when variant has no base language
Co-authored-by: Patrick Schlarmann <40386969-bnbb2@users.noreply.gitlab.com>
1 parent d439ea6 commit b939736

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎scripts/generate-voice-languages.mjs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ export async function update({ authKey, dryRun = false }) {
3232
console.warn(`voice variant ${l.lang} has no base language (${baseCode})`);
3333
}
3434

35-
// Transcription for variants is determined by base language
36-
const transcription = isVariant ? base?.features?.transcription : l.features.transcription;
35+
// Transcription for variants is determined by base language, if it exists
36+
const transcription = isVariant
37+
? (base?.features?.transcription ?? l.features.transcription)
38+
: l.features.transcription;
3739
const name = l.status !== 'stable' ? `${l.name} <Badge color="blue">beta</Badge>` : l.name;
3840

3941
return `| ${name} | ${mark(transcription)} | ✓ | ${mark(l.features.translated_speech)} |`;

0 commit comments

Comments
 (0)