play around with different voices
This commit is contained in:
parent
25f8df5a80
commit
6be98cb7eb
2 changed files with 4 additions and 1 deletions
|
|
@ -7,11 +7,13 @@ export async function synthesizeSpeech(env: Env, text: string): Promise<Response
|
|||
throw new Error("Cloudflare AI binding is missing");
|
||||
}
|
||||
|
||||
const speaker = env.TTS_SPEAKER || "asteria";
|
||||
|
||||
return env.AI.run(
|
||||
"@cf/deepgram/aura-2-en",
|
||||
{
|
||||
text,
|
||||
speaker: "asteria",
|
||||
speaker: speaker as Ai_Cf_Deepgram_Aura_2_En_Input["speaker"],
|
||||
encoding: "linear16",
|
||||
container: "none",
|
||||
sample_rate: AUDIO_OUTPUT_SAMPLE_RATE,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ export interface Env {
|
|||
AI: Ai;
|
||||
JWT_SECRET_KEY: string;
|
||||
OPENAI_API_KEY: string;
|
||||
TTS_SPEAKER?: string;
|
||||
ELATO_OPENAI_MODEL?: string;
|
||||
ELATO_OPENAI_SYSTEM_PROMPT?: string;
|
||||
ELATO_OPENAI_FIRST_MESSAGE?: string;
|
||||
|
|
|
|||
Loading…
Reference in a new issue