Document markup and improve choice tags
This commit is contained in:
@@ -173,7 +173,7 @@ export class OpenAITTSModule extends ApiTTSModuleBase {
|
||||
* @param {string} text - Text to generate speech for
|
||||
* @returns {Promise<Object>} - Audio data object
|
||||
*/
|
||||
async generateSpeechAudio(text) {
|
||||
async generateSpeechAudio(text, options = {}) {
|
||||
if (!this.isReady || !this.apiKey) {
|
||||
return { success: false, reason: 'not_ready' };
|
||||
}
|
||||
@@ -198,7 +198,8 @@ export class OpenAITTSModule extends ApiTTSModuleBase {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': `Bearer ${this.apiKey}`
|
||||
},
|
||||
body: JSON.stringify(payload)
|
||||
body: JSON.stringify(payload),
|
||||
signal: options.signal
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
|
||||
Reference in New Issue
Block a user