Skip to content

Refactor/api input#15

Merged
minhsaco99 merged 8 commits intomainfrom
refactor/api-input
Jan 26, 2026
Merged

Refactor/api input#15
minhsaco99 merged 8 commits intomainfrom
refactor/api-input

Conversation

@minhsaco99
Copy link
Copy Markdown
Owner

Description

Refactor TTS/STT API to use form data instead of query parameters for better REST
design and file upload support. Add voice cloning capability to TTS API with
reference_audio file upload and reference_text parameters.

Key changes:

  • Move text and engine_params from query params to form data (multipart/form-data)
  • Add reference_audio (file) and reference_text params for voice cloning
  • Update BaseTTSEngine interface with explicit voice cloning parameters
  • Add temp_audio_file() context manager utility for engines requiring file paths

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • New Engine (STT/TTS provider)
  • Breaking change (fix or feature that would cause existing functionality to not
    work as expected)
  • Refactor (non-breaking code cleanup or optimization)
  • Documentation update
  • Performance improvement

Checklist

  • I have read the CONTRIBUTING guide
  • My code follows the project's code style (make format)
  • Linting passes (make lint)
  • Tests pass (make test)
  • Documentation updated (if needed)
  • No sensitive information (API keys, secrets) included

Related Issues

Closes #

Testing & Verification

Automated Tests

  • Unit tests added/updated
  • All existing tests pass

Manual Verification (if applicable)

N/A

API Endpoints Tested (if applicable)

  • Batch endpoint (POST /api/v1/stt/transcribe or /tts/synthesize)
  • SSE streaming (POST .../stream)
  • WebSocket (WS .../ws)

Engine-Specific Tests (if applicable)

  • Engine type: TTS
  • Provider: VoxCPM
  • Model: N/A
  • Device tested: cpu

Security Impact

  • No security implications
  • Security impact (please describe below)

@minhsaco99 minhsaco99 merged commit f514699 into main Jan 26, 2026
4 checks passed
@minhsaco99 minhsaco99 deleted the refactor/api-input branch January 26, 2026 03:05
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.

1 participant