chatlabs icon indicating copy to clipboard operation
chatlabs copied to clipboard

Add OpenAI voice output for Pro users

Open vood opened this issue 10 months ago • 0 comments

Currently, we have a feature to play messages with browser's native text to voice capability.

We want to improve this feature further by enabling text to voice powered by openai https://platform.openai.com/docs/guides/text-to-speech

This is how it should work

  1. Only enabled for PRO users (profile.plan != 'free')
  2. We will likely need a add a dedicated endpoint to stream voice in /app/api/text-to-voice/route.ts. Read more about nextjs app routing here https://nextjs.org/docs/app. Also see other /app/api/* endpoints for example
  3. When user uses PRO account, switch text-to-voice to openai

vood avatar May 02 '24 16:05 vood