18 lines
392 B
Python
18 lines
392 B
Python
from pydantic import BaseModel
|
|
from typing import Optional
|
|
|
|
# Text-to-Speech Models
|
|
class VoiceRequest(BaseModel):
|
|
text: str
|
|
|
|
class VoiceResponse(BaseModel):
|
|
voice_output: str
|
|
|
|
# Speech-to-Text Models
|
|
class TranscriptionRequest(BaseModel):
|
|
audio_file_path: str
|
|
target_language: Optional[str] = "id" # Default to English
|
|
|
|
class TranscriptionResponse(BaseModel):
|
|
text: str
|