feat(podcast): listLanguages API call

This commit is contained in:
CREDO23 2026-06-12 07:38:38 +02:00
parent 3cf76e8295
commit 90cae46b5f

View file

@ -1,5 +1,6 @@
import { z } from "zod";
import {
languageOptions,
type PodcastSpec,
podcastDetail,
updateSpecRequest,
@ -60,6 +61,12 @@ class PodcastsApiService {
return baseApiService.get(`${BASE}/voices${qs}`, voiceOptionList);
};
// The languages the active provider can offer; the brief form renders
// exactly this list and only opens free entry when the backend allows it.
listLanguages = async () => {
return baseApiService.get(`${BASE}/languages`, languageOptions);
};
// A short audio sample of a voice, cached server-side per voice.
previewVoice = async (voiceId: string) => {
return baseApiService.getBlob(`${BASE}/voices/${encodeURIComponent(voiceId)}/preview`);