Create /api/speech/synthesize REST endpoint #396

Closed
opened 2026-02-15 07:34:35 +00:00 by jason.woltje · 1 comment
Owner

Description

Create REST endpoint for text-to-speech synthesis via the SpeechService.

Endpoint

===============================================================================
flac - Command-line FLAC encoder/decoder version 1.5.0
Copyright (C) 2000-2009 Josh Coalson
Copyright (C) 2011-2025 Xiph.Org Foundation

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

This is the short help; for all options use 'flac --help'; for more explanation
and examples please consult the manual. This manual is often distributed
alongside the program as a man page or an HTML file. It can also be found
online at https://xiph.org/flac/documentation_tools_flac.html

To encode:
flac [-#] [INPUTFILE [...]]

-# is -0 (fastest compression) to -8 (highest compression); -5 is the default

To decode:
flac -d [INPUTFILE [...]]

To test:
flac -t [INPUTFILE [...]]

Implementation

  • (add to existing controller)
  • Provider selection via request body or default config
  • Text length validation (configurable max, default 4096 chars)
  • Rate limiting per workspace
  • Requires authentication (workspace-scoped)
  • Streaming response option via Accept header

Acceptance Criteria

  • POST /api/speech/synthesize returns audio
  • Provider selection (default/premium/lightweight)
  • Voice selection
  • Speed control
  • Format selection
  • Text length validation
  • Workspace-scoped authentication
  • Unit + integration tests
## Description Create REST endpoint for text-to-speech synthesis via the SpeechService. ## Endpoint =============================================================================== flac - Command-line FLAC encoder/decoder version 1.5.0 Copyright (C) 2000-2009 Josh Coalson Copyright (C) 2011-2025 Xiph.Org Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. =============================================================================== This is the short help; for all options use 'flac --help'; for more explanation and examples please consult the manual. This manual is often distributed alongside the program as a man page or an HTML file. It can also be found online at https://xiph.org/flac/documentation_tools_flac.html To encode: flac [-#] [INPUTFILE [...]] -# is -0 (fastest compression) to -8 (highest compression); -5 is the default To decode: flac -d [INPUTFILE [...]] To test: flac -t [INPUTFILE [...]] ## Implementation - (add to existing controller) - Provider selection via request body or default config - Text length validation (configurable max, default 4096 chars) - Rate limiting per workspace - Requires authentication (workspace-scoped) - Streaming response option via Accept header ## Acceptance Criteria - [ ] POST /api/speech/synthesize returns audio - [ ] Provider selection (default/premium/lightweight) - [ ] Voice selection - [ ] Speed control - [ ] Format selection - [ ] Text length validation - [ ] Workspace-scoped authentication - [ ] Unit + integration tests
jason.woltje added this to the M13-SpeechServices (0.0.13) milestone 2026-02-15 07:34:35 +00:00
Author
Owner

Completed as part of M13-SpeechServices milestone on branch feature/m13-speech-services. SP-EP-002: /api/speech/synthesize REST endpoint (commit 527262a, 17 tests). All quality gates passed (lint, typecheck, tests, security).

Completed as part of M13-SpeechServices milestone on branch feature/m13-speech-services. SP-EP-002: /api/speech/synthesize REST endpoint (commit 527262a, 17 tests). All quality gates passed (lint, typecheck, tests, security).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#396