voicemix 1.2.2 → 1.2.6

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.
Files changed (2) hide show
  1. package/index.js +5 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -149,9 +149,11 @@ 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
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "voicemix",
3
3
  "type": "module",
4
- "version": "1.2.2",
4
+ "version": "1.2.6",
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": {