diff --git a/app/components/MainStage.vue b/app/components/MainStage.vue index 501155898..6c343b159 100644 --- a/app/components/MainStage.vue +++ b/app/components/MainStage.vue @@ -37,6 +37,7 @@ const nowSpeakingAvatarBorderOpacityMax = 100 const openAiApiKey = useLocalStorage('openai-api-key', '') const openAiApiBaseURL = useLocalStorage('openai-api-base-url', '') const openAIModel = useLocalStorage<{ id: string, name?: string }>('openai-model', { id: 'openai/gpt-3.5-turbo', name: 'OpenAI GPT3.5 Turbo' }) +const elevenLabsApiKey = useLocalStorage('elevenlabs-api-key', '') const { setupOpenAI, streamSpeech, stream, models } = useLLM() const { audioContext, calculateVolume } = useAudioContext() @@ -102,7 +103,7 @@ const ttsQueue = useQueue({ handlers: [ async (ctx) => { const now = Date.now() - const res = await streamSpeech(ctx.data) + const res = await streamSpeech(ctx.data, elevenLabsApiKey.value) const elapsed = Date.now() - now // eslint-disable-next-line no-console @@ -253,6 +254,13 @@ onUnmounted(() => {