voicemix 1.2.0 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -149,17 +149,17 @@ export class VoiceMix {
149
149
  }
150
150
 
151
151
  _filename(text) {
152
- text += " " + this.promptText + " " + this.xmlLang + " " + this.ttsId;
153
- text += " " + this.providerType;
154
- const filename = this.randPosfix ? hashNow(text) : hash(text);
152
+ const parts = [text, this.promptText, this.xmlLang, this.ttsId, this.providerType]
153
+ .map(v => v ?? '')
154
+ .join(' ');
155
+
156
+ const filename = this.randPosfix ? hashNow(parts) : hash(parts);
155
157
  return this.filePrefix + filename;
156
158
  }
157
159
 
158
160
  say(text) {
159
161
  this.text = text;
160
- // Eliminar contenido entre corchetes para el nombre del archivo
161
- const textForFilename = text.replace(/\[.*?\]/g, '').trim();
162
- return this.file(this._filename(textForFilename));
162
+ return this.file(this._filename(text));
163
163
  }
164
164
 
165
165
  file(fileName) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "voicemix",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "1.2.4",
5
5
  "description": "🗣️ VoiceMix - A simple text-to-speech tool using ElevenLabs, Cartesia and Resemble AI APIs.",
6
6
  "main": "index.js",
7
7
  "repository": {