@andresaya/edge-tts 1.1.2 → 1.1.3
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/dist/cli/edge-tts.js
CHANGED
|
@@ -1852,6 +1852,8 @@ var Constants = {
|
|
|
1852
1852
|
|
|
1853
1853
|
// src/services/EdgeTTS.ts
|
|
1854
1854
|
import WebSocket from "ws";
|
|
1855
|
+
import {writeFileSync} from "fs";
|
|
1856
|
+
|
|
1855
1857
|
class EdgeTTS {
|
|
1856
1858
|
audio_stream = [];
|
|
1857
1859
|
audio_format = "mp3";
|
|
@@ -1941,7 +1943,7 @@ class EdgeTTS {
|
|
|
1941
1943
|
if (this.audio_stream.length) {
|
|
1942
1944
|
const audioBuffer = Buffer.concat(this.audio_stream);
|
|
1943
1945
|
const uint8Array = new Uint8Array(audioBuffer);
|
|
1944
|
-
|
|
1946
|
+
writeFileSync(outputPath, uint8Array);
|
|
1945
1947
|
} else {
|
|
1946
1948
|
throw new Error("No audio data available to save.");
|
|
1947
1949
|
}
|
|
@@ -1993,7 +1995,7 @@ var VoiceListCommand = new Command("voice-list").description("Get the list of av
|
|
|
1993
1995
|
|
|
1994
1996
|
// src/cli/edge-tts.ts
|
|
1995
1997
|
var program2 = new Command;
|
|
1996
|
-
program2.version("1.1.
|
|
1998
|
+
program2.version("1.1.2").addCommand(SynthesizeCommand).addCommand(VoiceListCommand);
|
|
1997
1999
|
try {
|
|
1998
2000
|
program2.parse();
|
|
1999
2001
|
} catch (error) {
|
|
@@ -1852,6 +1852,8 @@ var Constants = {
|
|
|
1852
1852
|
|
|
1853
1853
|
// src/services/EdgeTTS.ts
|
|
1854
1854
|
import WebSocket from "ws";
|
|
1855
|
+
import {writeFileSync} from "fs";
|
|
1856
|
+
|
|
1855
1857
|
class EdgeTTS {
|
|
1856
1858
|
audio_stream = [];
|
|
1857
1859
|
audio_format = "mp3";
|
|
@@ -1941,7 +1943,7 @@ class EdgeTTS {
|
|
|
1941
1943
|
if (this.audio_stream.length) {
|
|
1942
1944
|
const audioBuffer = Buffer.concat(this.audio_stream);
|
|
1943
1945
|
const uint8Array = new Uint8Array(audioBuffer);
|
|
1944
|
-
|
|
1946
|
+
writeFileSync(outputPath, uint8Array);
|
|
1945
1947
|
} else {
|
|
1946
1948
|
throw new Error("No audio data available to save.");
|
|
1947
1949
|
}
|
|
@@ -1852,6 +1852,8 @@ var Constants = {
|
|
|
1852
1852
|
|
|
1853
1853
|
// src/services/EdgeTTS.ts
|
|
1854
1854
|
import WebSocket from "ws";
|
|
1855
|
+
import {writeFileSync} from "fs";
|
|
1856
|
+
|
|
1855
1857
|
class EdgeTTS {
|
|
1856
1858
|
audio_stream = [];
|
|
1857
1859
|
audio_format = "mp3";
|
|
@@ -1941,7 +1943,7 @@ class EdgeTTS {
|
|
|
1941
1943
|
if (this.audio_stream.length) {
|
|
1942
1944
|
const audioBuffer = Buffer.concat(this.audio_stream);
|
|
1943
1945
|
const uint8Array = new Uint8Array(audioBuffer);
|
|
1944
|
-
|
|
1946
|
+
writeFileSync(outputPath, uint8Array);
|
|
1945
1947
|
} else {
|
|
1946
1948
|
throw new Error("No audio data available to save.");
|
|
1947
1949
|
}
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,8 @@ var Constants = {
|
|
|
26
26
|
|
|
27
27
|
// src/services/EdgeTTS.ts
|
|
28
28
|
import WebSocket from "ws";
|
|
29
|
+
import {writeFileSync} from "fs";
|
|
30
|
+
|
|
29
31
|
class EdgeTTS {
|
|
30
32
|
audio_stream = [];
|
|
31
33
|
audio_format = "mp3";
|
|
@@ -115,7 +117,7 @@ class EdgeTTS {
|
|
|
115
117
|
if (this.audio_stream.length) {
|
|
116
118
|
const audioBuffer = Buffer.concat(this.audio_stream);
|
|
117
119
|
const uint8Array = new Uint8Array(audioBuffer);
|
|
118
|
-
|
|
120
|
+
writeFileSync(outputPath, uint8Array);
|
|
119
121
|
} else {
|
|
120
122
|
throw new Error("No audio data available to save.");
|
|
121
123
|
}
|
package/dist/services/EdgeTTS.js
CHANGED
|
@@ -26,6 +26,8 @@ var Constants = {
|
|
|
26
26
|
|
|
27
27
|
// src/services/EdgeTTS.ts
|
|
28
28
|
import WebSocket from "ws";
|
|
29
|
+
import {writeFileSync} from "fs";
|
|
30
|
+
|
|
29
31
|
class EdgeTTS {
|
|
30
32
|
audio_stream = [];
|
|
31
33
|
audio_format = "mp3";
|
|
@@ -115,7 +117,7 @@ class EdgeTTS {
|
|
|
115
117
|
if (this.audio_stream.length) {
|
|
116
118
|
const audioBuffer = Buffer.concat(this.audio_stream);
|
|
117
119
|
const uint8Array = new Uint8Array(audioBuffer);
|
|
118
|
-
|
|
120
|
+
writeFileSync(outputPath, uint8Array);
|
|
119
121
|
} else {
|
|
120
122
|
throw new Error("No audio data available to save.");
|
|
121
123
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andresaya/edge-tts",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"module": "dist/index.js",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@types/uuid": "^10.0.0",
|
|
18
18
|
"commander": "^12.1.0",
|
|
19
|
+
"fs": "^0.0.1-security",
|
|
19
20
|
"ws": "^8.18.0"
|
|
20
21
|
},
|
|
21
22
|
"peerDependencies": {
|