Add Volcengine support for TTS and ASR services
- Introduced Volcengine as a new provider for both TTS and ASR services. - Updated configuration files to include Volcengine-specific parameters such as app_id, resource_id, and uid. - Enhanced the ASR service to support streaming mode with Volcengine's API. - Modified existing tests to validate the integration of Volcengine services. - Updated documentation to reflect the addition of Volcengine as a supported provider for TTS and ASR. - Refactored service factory to accommodate Volcengine alongside existing providers.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
from typing import AsyncIterator, Awaitable, Callable, Literal, Optional, Protocol
|
||||
from typing import Any, AsyncIterator, Awaitable, Callable, Dict, Literal, Optional, Protocol
|
||||
|
||||
from providers.common.base import ASRResult
|
||||
|
||||
@@ -22,6 +22,11 @@ class ASRServiceSpec:
|
||||
api_key: Optional[str] = None
|
||||
api_url: Optional[str] = None
|
||||
model: Optional[str] = None
|
||||
app_id: Optional[str] = None
|
||||
resource_id: Optional[str] = None
|
||||
cluster: Optional[str] = None
|
||||
uid: Optional[str] = None
|
||||
request_params: Optional[Dict[str, Any]] = None
|
||||
enable_interim: bool = False
|
||||
interim_interval_ms: int = 500
|
||||
min_audio_for_interim_ms: int = 300
|
||||
|
||||
@@ -19,6 +19,10 @@ class TTSServiceSpec:
|
||||
api_key: Optional[str] = None
|
||||
api_url: Optional[str] = None
|
||||
model: Optional[str] = None
|
||||
app_id: Optional[str] = None
|
||||
resource_id: Optional[str] = None
|
||||
cluster: Optional[str] = None
|
||||
uid: Optional[str] = None
|
||||
mode: str = "commit"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user