mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-20 23:21:06 +02:00
feat(podcast): listLanguages API call
This commit is contained in:
parent
3cf76e8295
commit
90cae46b5f
1 changed files with 7 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import {
|
import {
|
||||||
|
languageOptions,
|
||||||
type PodcastSpec,
|
type PodcastSpec,
|
||||||
podcastDetail,
|
podcastDetail,
|
||||||
updateSpecRequest,
|
updateSpecRequest,
|
||||||
|
|
@ -60,6 +61,12 @@ class PodcastsApiService {
|
||||||
return baseApiService.get(`${BASE}/voices${qs}`, voiceOptionList);
|
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.
|
// A short audio sample of a voice, cached server-side per voice.
|
||||||
previewVoice = async (voiceId: string) => {
|
previewVoice = async (voiceId: string) => {
|
||||||
return baseApiService.getBlob(`${BASE}/voices/${encodeURIComponent(voiceId)}/preview`);
|
return baseApiService.getBlob(`${BASE}/voices/${encodeURIComponent(voiceId)}/preview`);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue