Merge branch 'refactor/backend-architecture' into development
This commit is contained in:
10
api/app/ports/tts.py
Normal file
10
api/app/ports/tts.py
Normal file
@@ -0,0 +1,10 @@
|
||||
"""TTSProvider port — 文字转语音能力契约。"""
|
||||
|
||||
from typing import Protocol, runtime_checkable
|
||||
|
||||
|
||||
@runtime_checkable
|
||||
class TTSProvider(Protocol):
|
||||
async def synthesize(self, text: str, voice: str = "alloy") -> bytes:
|
||||
"""Convert text to speech audio bytes."""
|
||||
...
|
||||
Reference in New Issue
Block a user