feat(backend): add SaluteSpeech schema types and extend engine enum
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@ from uuid import UUID
|
|||||||
from cpv3.common.schemas import Schema
|
from cpv3.common.schemas import Schema
|
||||||
|
|
||||||
|
|
||||||
TranscriptionEngineEnum = Literal["LOCAL_WHISPER", "GOOGLE_SPEECH_CLOUD"]
|
TranscriptionEngineEnum = Literal["LOCAL_WHISPER", "GOOGLE_SPEECH_CLOUD", "SALUTE_SPEECH"]
|
||||||
|
|
||||||
|
|
||||||
class TranscriptionRead(Schema):
|
class TranscriptionRead(Schema):
|
||||||
@@ -144,3 +144,31 @@ class GoogleSpeechResult(Schema):
|
|||||||
class GoogleSpeechParams(Schema):
|
class GoogleSpeechParams(Schema):
|
||||||
file_path: str
|
file_path: str
|
||||||
language_codes: list[str] | None = None
|
language_codes: list[str] | None = None
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------- SaluteSpeech Models ----------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
class SaluteSpeechWord(Schema):
|
||||||
|
word: str
|
||||||
|
start: float
|
||||||
|
end: float
|
||||||
|
|
||||||
|
|
||||||
|
class SaluteSpeechSegment(Schema):
|
||||||
|
text: str
|
||||||
|
start: float
|
||||||
|
end: float
|
||||||
|
words: list[SaluteSpeechWord] = []
|
||||||
|
|
||||||
|
|
||||||
|
class SaluteSpeechResult(Schema):
|
||||||
|
text: str
|
||||||
|
segments: list[SaluteSpeechSegment]
|
||||||
|
language: str
|
||||||
|
|
||||||
|
|
||||||
|
class SaluteSpeechParams(Schema):
|
||||||
|
file_path: str
|
||||||
|
language: str | None = None
|
||||||
|
model: str = "general"
|
||||||
|
|||||||
Reference in New Issue
Block a user