feat: add default voices

This commit is contained in:
2026-01-14 21:29:07 -03:00
parent 71da6e841d
commit 5877644ed9
3 changed files with 4 additions and 0 deletions
+1
View File
@@ -6,6 +6,7 @@ class AzureTTS implements TTSModule {
private voices: Array<string> | undefined = undefined;
public name: string = 'Azure';
public defaultVoice: string = 'en-US-AvaNeural';
async getVoices(): Promise<Array<string> | undefined> {
if (!this.voices) {
+2
View File
@@ -9,6 +9,8 @@ const USER_AGENT =
const ttsGoogle: TTSModule = {
name: 'Google',
defaultVoice: 'en',
async getVoices(): Promise<string[]> { return GOOGLE_TTS_VOICES.voices },
async generate(voice: string, text: string): Promise<TTSResponse> {
+1
View File
@@ -11,6 +11,7 @@ export interface TTSResponse {
export interface TTSModule {
name: string;
defaultVoice?: string;
getVoices: () => Promise<Array<string> | undefined>;
generate: (voice: string, text: string) => Promise<TTSResponse>;
canBeUsed: () => Promise<boolean>;