Feat: support azure tts (#651)
* upgrade deps * update tts providers * refactor conversation form * update tts providers config * add azure tts api * fix azure sdk usage * consume/revoke token * upgrade deps
This commit is contained in:
@@ -283,12 +283,26 @@ export class Client {
|
||||
}
|
||||
|
||||
generateSpeechToken(params?: {
|
||||
purpose?: string;
|
||||
targetType?: string;
|
||||
targetId?: string;
|
||||
}): Promise<{ token: string; region: string }> {
|
||||
input?: string;
|
||||
}): Promise<{ id: number; token: string; region: string }> {
|
||||
return this.api.post("/api/speech/tokens", decamelizeKeys(params || {}));
|
||||
}
|
||||
|
||||
consumeSpeechToken(id: number) {
|
||||
return this.api.put(`/api/speech/tokens/${id}`, {
|
||||
state: "consumed",
|
||||
});
|
||||
}
|
||||
|
||||
revokeSpeechToken(id: number) {
|
||||
return this.api.put(`/api/speech/tokens/${id}`, {
|
||||
state: "revoked",
|
||||
});
|
||||
}
|
||||
|
||||
syncPronunciationAssessment(
|
||||
pronunciationAssessment: Partial<PronunciationAssessmentType>
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user