Skip to content

Commit ef9d6b8

Browse files
committed
refactor(elevenlabs): remove redundant V3_AUDIO_TAG_MODELS, reuse MODEL_V3
1 parent ec41606 commit ef9d6b8

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/engines/elevenlabs.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,6 @@ export class ElevenLabsTTSClient extends AbstractTTSClient {
486486

487487
private static readonly AUDIO_TAG_REGEX = /\[[^\]]+\]/g;
488488

489-
private static readonly V3_AUDIO_TAG_MODELS = ["eleven_v3"];
490-
491489
/**
492490
* Prepare text for synthesis by stripping SSML tags.
493491
* ElevenLabs does not support SSML — use native [audio tags] for v3 expressiveness.
@@ -521,9 +519,7 @@ export class ElevenLabsTTSClient extends AbstractTTSClient {
521519
*/
522520
private processAudioTags(text: string, options?: ElevenLabsTTSOptions): string {
523521
const modelId = this.resolveModelId(options);
524-
const isAudioTagModel = ElevenLabsTTSClient.V3_AUDIO_TAG_MODELS.some((m) =>
525-
modelId.startsWith(m)
526-
);
522+
const isAudioTagModel = modelId.startsWith(ElevenLabsTTSClient.MODEL_V3);
527523

528524
if (isAudioTagModel) {
529525
return text;

0 commit comments

Comments
 (0)