From c1057ef8a0c6ae13638c12621ce86fd591e9a555 Mon Sep 17 00:00:00 2001 From: Valentyne Stigloher Date: Tue, 19 Mar 2024 19:01:44 +0100 Subject: [PATCH] (ts) reference aws polly types in pronunciation voice config --- locale/config.ts | 8 +++++--- locale/ko/config.suml | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/locale/config.ts b/locale/config.ts index 886e712d3..849311328 100644 --- a/locale/config.ts +++ b/locale/config.ts @@ -1,3 +1,5 @@ +import type { Engine, LanguageCode, VoiceId } from '@aws-sdk/client-polly'; + type Toggable = ({ enabled: true } & T) | { enabled: false } & Partial; export interface Config { @@ -283,15 +285,15 @@ interface PronunciationVoiceConfig { /** * language code */ - language: string; + language: LanguageCode; /** * voice name */ - voice: string; + voice: VoiceId; /** * voice engine */ - engine: 'standard' | 'neural'; + engine: Engine; } interface SourcesConfig { diff --git a/locale/ko/config.suml b/locale/ko/config.suml index 9c635c5c9..fff8beeb1 100644 --- a/locale/ko/config.suml +++ b/locale/ko/config.suml @@ -44,8 +44,8 @@ pronouns: pronunciation: enabled: true voices: - GB: - language: 'ko-KO' + KO: + language: 'ko-KR' voice: 'Seoyeon' engine: 'neural'