Address PR review: rename to XAIHttpTTSService, add language map, clean up API
- Rename XAITTSService → XAIHttpTTSService and XAITTSSettings → XAIHttpTTSSettings - Add language_to_xai_language() with explicit LANGUAGE_MAP using resolve_language() - Remove deprecated InputParams, params, voice, language init params - Remove XAI_DEFAULT_SAMPLE_RATE and XAI_PCM_CODEC constants; add encoding param - Set sample_rate=None default (picked up from PipelineParams or user) - Use Language.EN enum instead of string "en" for default language - Add changelog/4031.added.md - Add 07e-interruptible-xai.py foundational example - Update 14g-function-calling-grok.py to use XAIHttpTTSService - Register 07e in run-release-evals.py
This commit is contained in:
committed by
Mark Backman
parent
02b97035f8
commit
bbd14de9c5
@@ -4,7 +4,7 @@
|
||||
# SPDX-License-Identifier: BSD 2-Clause License
|
||||
#
|
||||
|
||||
"""Tests for XAITTSService."""
|
||||
"""Tests for XAIHttpTTSService."""
|
||||
|
||||
import asyncio
|
||||
import unittest
|
||||
@@ -21,7 +21,7 @@ from pipecat.frames.frames import (
|
||||
TTSStoppedFrame,
|
||||
TTSTextFrame,
|
||||
)
|
||||
from pipecat.services.xai.tts import XAITTSService
|
||||
from pipecat.services.xai.tts import XAIHttpTTSService
|
||||
from pipecat.tests.utils import run_test
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ async def test_run_xai_tts_success(aiohttp_client):
|
||||
base_url = str(client.make_url("/v1/tts"))
|
||||
|
||||
async with aiohttp.ClientSession() as session:
|
||||
tts_service = XAITTSService(
|
||||
tts_service = XAIHttpTTSService(
|
||||
api_key="test-key",
|
||||
base_url=base_url,
|
||||
aiohttp_session=session,
|
||||
|
||||
Reference in New Issue
Block a user