Skip to content

Refactoring Waves SDK for POST APIs#51

Open
Aytida-xd wants to merge 1 commit intomainfrom
refactor-existing
Open

Refactoring Waves SDK for POST APIs#51
Aytida-xd wants to merge 1 commit intomainfrom
refactor-existing

Conversation

@Aytida-xd
Copy link
Collaborator

@Aytida-xd Aytida-xd commented Feb 3, 2026

Issues

  • Client was TTS specific (Client object had TTS params in constructor and STT params had to be passed in function call)
  • Languages were common for all models
  • Old incorrect endpoints were being used

Changes

  • Client object only takes API key

  • feature params need to be given in transcribe/synthesize function calls

  • Supported languages can be different for different models

  • Handling and validation for lightning v3.1 and v2 (consistency, similarity, enhancement supported)

  • Removed support for lightning and lightning-large

  • If no model provided for TTS, it defaults to v3.1


EntelligenceAI PR Summary

This PR upgrades the Waves SDK to support new model versions (lightning-v3.1, pulse) and simplifies the API by removing configuration objects in favor of explicit parameters.

  • Refactored sync/async clients to accept only API key in constructor; TTS/STT parameters now passed directly to methods
  • Updated default models: lightning-v3.1 for TTS (44.1kHz), pulse for STT
  • Renamed all ASR terminology to STT throughout codebase
  • Added diarization support to transcribe() method with binary upload
  • Implemented conditional parameter handling for voice cloning (lightning-v2 only)
  • Split get_models() into separate get_tts_models() and get_stt_models() methods
  • Added model-specific sample rate validation and dynamic WebSocket URLs
  • Enhanced documentation with comprehensive docstrings

language: Optional[str] = "en",
output_format: Optional[str] = "wav"
) -> None:
def __init__(self, api_key: str = None) -> None:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness: The signature change in WavesClient.__init__ (line 13) removes several parameters (model, sample_rate, voice_id, etc.) that were previously accepted. This is a breaking change that will cause a TypeError for any existing callers passing these arguments, leading to runtime crashes upon upgrading the SDK.

🤖 AI Agent Prompt for Cursor/Windsurf

📋 Copy this prompt to your AI coding assistant (Cursor, Windsurf, etc.) to get help fixing this issue

In `smallestai/waves/waves_client.py` at the `WavesClient.__init__` definition (around line 13), restore backward compatibility by re-adding the previous optional parameters or by accepting `**kwargs` and ignoring/handling them. Ensure callers passing old args do not raise `TypeError`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants