mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-05-01 04:50:01 +00:00
26 lines
464 B
Python
26 lines
464 B
Python
"""
|
|
Classes for supporting different text to speech models
|
|
"""
|
|
|
|
from abc import ABC
|
|
from dataclasses import dataclass
|
|
from typing import Optional
|
|
|
|
|
|
@dataclass
|
|
class TextToSpeechModel(ABC):
|
|
"""
|
|
Abstract base class for text to speech models.
|
|
"""
|
|
|
|
model_name: Optional[str] = None
|
|
|
|
|
|
@dataclass
|
|
class OpenAITextToSpeechModel(TextToSpeechModel):
|
|
model_name: str
|
|
|
|
|
|
@dataclass
|
|
class ElevenLabsTextToSpeechModel(TextToSpeechModel):
|
|
model_name: str
|