Add new voices to OpenAITTSService
This commit is contained in:
@@ -59,7 +59,7 @@ async def main():
|
||||
prompt="Expect words related to dogs, such as breed names.",
|
||||
)
|
||||
|
||||
tts = OpenAITTSService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4o-mini-tts-latest")
|
||||
tts = OpenAITTSService(api_key=os.getenv("OPENAI_API_KEY"), voice="ballad")
|
||||
|
||||
llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4o")
|
||||
|
||||
|
||||
@@ -19,14 +19,20 @@ from pipecat.frames.frames import (
|
||||
)
|
||||
from pipecat.services.tts_service import TTSService
|
||||
|
||||
ValidVoice = Literal["alloy", "echo", "fable", "onyx", "nova", "shimmer"]
|
||||
ValidVoice = Literal[
|
||||
"alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer"
|
||||
]
|
||||
|
||||
VALID_VOICES: Dict[str, ValidVoice] = {
|
||||
"alloy": "alloy",
|
||||
"ash": "ash",
|
||||
"ballad": "ballad",
|
||||
"coral": "coral",
|
||||
"echo": "echo",
|
||||
"fable": "fable",
|
||||
"onyx": "onyx",
|
||||
"nova": "nova",
|
||||
"sage": "sage",
|
||||
"shimmer": "shimmer",
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user