khurrameycon commited on
Commit
1570ec4
·
verified ·
1 Parent(s): 60e1507

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -107,6 +107,8 @@ import base64
107
  import logging
108
  from typing import Optional
109
  import uuid
 
 
110
 
111
  # Set up logging
112
  logging.basicConfig(level=logging.INFO)
@@ -115,11 +117,11 @@ logger = logging.getLogger(__name__)
115
  class TextImageRequest(BaseModel):
116
  text: Optional[str] = None
117
  image_base64: Optional[str] = None
118
- voice: str = "af_heart" # Default voice that we know exists
119
  speed: float = 1.0
120
 
121
- # List of known available voices - update this based on what's actually available
122
- AVAILABLE_VOICES = ["af_heart"] # Add more voices as they become available
123
 
124
  def validate_voice(self):
125
  if self.voice not in self.AVAILABLE_VOICES:
 
107
  import logging
108
  from typing import Optional
109
  import uuid
110
+ from typing import Optional, ClassVar, List
111
+
112
 
113
  # Set up logging
114
  logging.basicConfig(level=logging.INFO)
 
117
  class TextImageRequest(BaseModel):
118
  text: Optional[str] = None
119
  image_base64: Optional[str] = None
120
+ voice: str = "af_heart" # Default voice
121
  speed: float = 1.0
122
 
123
+ # Annotate as ClassVar to indicate this is not a model field.
124
+ AVAILABLE_VOICES: ClassVar[List[str]] = ["af_heart"]
125
 
126
  def validate_voice(self):
127
  if self.voice not in self.AVAILABLE_VOICES: