fix(provider.elevenlabs): Provide default ElevenLabs TTS voice fallback and add local tool/project configs
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartai',
|
||||
version: '0.7.5',
|
||||
version: '0.7.6',
|
||||
description: 'SmartAi is a versatile TypeScript library designed to facilitate integration and interaction with various AI models, offering functionalities for chat, audio generation, document processing, and vision tasks.'
|
||||
}
|
||||
|
||||
@@ -55,11 +55,8 @@ export class ElevenLabsProvider extends MultiModalModel {
|
||||
modelId?: string;
|
||||
voiceSettings?: IElevenLabsVoiceSettings;
|
||||
}): Promise<NodeJS.ReadableStream> {
|
||||
const voiceId = optionsArg.voiceId || this.options.defaultVoiceId;
|
||||
|
||||
if (!voiceId) {
|
||||
throw new Error('Voice ID is required for ElevenLabs TTS. Please provide voiceId in the method call or set defaultVoiceId in provider options.');
|
||||
}
|
||||
// Use Samara voice as default fallback
|
||||
const voiceId = optionsArg.voiceId || this.options.defaultVoiceId || '19STyYD15bswVz51nqLf';
|
||||
|
||||
const modelId = optionsArg.modelId || this.options.defaultModelId || 'eleven_v3';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user