typecast-python 0.3.5__tar.gz → 0.3.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: typecast-python
3
- Version: 0.3.5
3
+ Version: 0.3.6
4
4
  Summary: Official Typecast Python SDK - Convert text to lifelike speech using AI-powered voices
5
5
  Project-URL: Homepage, https://typecast.ai
6
6
  Project-URL: Documentation, https://typecast.ai/docs/overview
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "typecast-python"
7
- version = "0.3.5"
7
+ version = "0.3.6"
8
8
  description = "Official Typecast Python SDK - Convert text to lifelike speech using AI-powered voices"
9
9
  authors = [
10
10
  {name = "Neosapience", email = "help@typecast.ai"}
@@ -191,8 +191,7 @@ class AsyncTypecast:
191
191
 
192
192
  Args:
193
193
  request: Streaming TTS request. Uses `OutputStream`, which omits
194
- `volume` and `target_lufs` (not supported by the streaming
195
- endpoint).
194
+ `volume` (not supported by the streaming endpoint).
196
195
  chunk_size: Maximum bytes returned per yielded chunk.
197
196
 
198
197
  Yields:
@@ -225,8 +225,7 @@ class Typecast:
225
225
 
226
226
  Args:
227
227
  request: Streaming TTS request. Uses `OutputStream`, which omits
228
- `volume` and `target_lufs` (not supported by the streaming
229
- endpoint).
228
+ `volume` (not supported by the streaming endpoint).
230
229
  chunk_size: Maximum bytes returned per yielded chunk.
231
230
 
232
231
  Yields:
@@ -183,9 +183,8 @@ class TTSResponse(BaseModel):
183
183
  class OutputStream(BaseModel):
184
184
  """Audio output settings for streaming mode.
185
185
 
186
- Streaming mode does not support `volume` or `target_lufs` because the
187
- server has to commit each chunk before the full waveform is known.
188
- Passing either field raises a validation error so misuse fails fast.
186
+ Streaming mode does not support `volume`, but it supports `target_lufs`
187
+ for absolute loudness normalization.
189
188
  """
190
189
 
191
190
  model_config = ConfigDict(extra="forbid")
@@ -195,12 +194,18 @@ class OutputStream(BaseModel):
195
194
  audio_format: Optional[str] = Field(
196
195
  default="wav", description="Audio format", examples=["wav", "mp3"]
197
196
  )
197
+ target_lufs: Optional[float] = Field(
198
+ default=None,
199
+ ge=-70.0,
200
+ le=0.0,
201
+ description="Target loudness in LUFS for streaming output normalization (-70 to 0).",
202
+ )
198
203
 
199
204
 
200
205
  class TTSRequestStream(BaseModel):
201
206
  """Request body for `POST /v1/text-to-speech/stream`.
202
207
 
203
- Mirrors `TTSRequest` but uses `OutputStream` (no volume / target_lufs).
208
+ Mirrors `TTSRequest` but uses `OutputStream` (no volume).
204
209
  """
205
210
 
206
211
  model_config = ConfigDict(json_schema_extra={"exclude_none": True})
File without changes