echogarden 2.2.0 → 2.3.0
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/README.md +7 -2
- package/data/lexicons/heteronyms.en.json +1 -1
- package/data/schemas/options.json +27 -2
- package/dist/api/Synthesis.d.ts +5 -2
- package/dist/api/Synthesis.js +36 -7
- package/dist/api/Synthesis.js.map +1 -1
- package/dist/recognition/DeepgramSTT.d.ts +3 -2
- package/dist/recognition/DeepgramSTT.js +54 -27
- package/dist/recognition/DeepgramSTT.js.map +1 -1
- package/dist/synthesis/DeepgramTTS.d.ts +15 -0
- package/dist/synthesis/DeepgramTTS.js +127 -0
- package/dist/synthesis/DeepgramTTS.js.map +1 -0
- package/dist/synthesis/ElevenLabsTTS.d.ts +8 -2
- package/dist/synthesis/ElevenLabsTTS.js +91 -33
- package/dist/synthesis/ElevenLabsTTS.js.map +1 -1
- package/dist/synthesis/EspeakTTS.js +4 -1
- package/dist/synthesis/EspeakTTS.js.map +1 -1
- package/dist/utilities/ObjectUtilities.js +6 -1
- package/dist/utilities/ObjectUtilities.js.map +1 -1
- package/dist/utilities/WasmMemoryManager.d.ts +1 -1
- package/docs/Engines.md +2 -1
- package/docs/Options.md +13 -2
- package/docs/Tasklist.md +0 -1
- package/package.json +2 -2
- package/src/api/Synthesis.ts +58 -10
- package/src/recognition/DeepgramSTT.ts +66 -29
- package/src/synthesis/DeepgramTTS.ts +149 -0
- package/src/synthesis/ElevenLabsTTS.ts +109 -32
- package/src/synthesis/EspeakTTS.ts +5 -1
- package/src/utilities/ObjectUtilities.ts +30 -13
|
@@ -30,7 +30,7 @@ export function deepClone<T>(val: T) {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
function clone<T>(val: T, deep = true, seenObjects: any[] = []): T {
|
|
33
|
-
if (val
|
|
33
|
+
if (val === undefined || val === null || typeof val !== 'object') {
|
|
34
34
|
return val
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -57,71 +57,88 @@ function clone<T>(val: T, deep = true, seenObjects: any[] = []): T {
|
|
|
57
57
|
|
|
58
58
|
seenObjects.pop()
|
|
59
59
|
|
|
60
|
-
return
|
|
60
|
+
return clonedArray as any
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
case '[object ArrayBuffer]': {
|
|
64
64
|
const clonedArray = new Uint8Array(obj.byteLength)
|
|
65
65
|
clonedArray.set(new Uint8Array(obj))
|
|
66
|
-
|
|
66
|
+
|
|
67
|
+
return clonedArray.buffer as any
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
case '[object Int8Array]': {
|
|
70
71
|
const clonedArray = new Int8Array(obj.length)
|
|
71
72
|
clonedArray.set(obj)
|
|
72
|
-
|
|
73
|
+
|
|
74
|
+
return clonedArray as any
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
case '[object Uint8Array]': {
|
|
76
78
|
const clonedArray = new Uint8Array(obj.length)
|
|
77
79
|
clonedArray.set(obj)
|
|
78
|
-
|
|
80
|
+
|
|
81
|
+
return clonedArray as any
|
|
79
82
|
}
|
|
80
83
|
|
|
81
84
|
case '[object Uint8ClampedArray]': {
|
|
82
85
|
const clonedArray = new Uint8ClampedArray(obj.length)
|
|
83
86
|
clonedArray.set(obj)
|
|
84
|
-
|
|
87
|
+
|
|
88
|
+
return clonedArray as any
|
|
85
89
|
}
|
|
86
90
|
|
|
87
91
|
case '[object Int16Array]': {
|
|
88
92
|
const clonedArray = new Int16Array(obj.length)
|
|
89
93
|
clonedArray.set(obj)
|
|
90
|
-
|
|
94
|
+
|
|
95
|
+
return clonedArray as any
|
|
91
96
|
}
|
|
92
97
|
|
|
93
98
|
case '[object Uint16Array]': {
|
|
94
99
|
const clonedArray = new Uint16Array(obj.length)
|
|
95
100
|
clonedArray.set(obj)
|
|
96
|
-
|
|
101
|
+
|
|
102
|
+
return clonedArray as any
|
|
97
103
|
}
|
|
98
104
|
|
|
99
105
|
case '[object Int32Array]': {
|
|
100
106
|
const clonedArray = new Int32Array(obj.length)
|
|
101
107
|
clonedArray.set(obj)
|
|
102
|
-
|
|
108
|
+
|
|
109
|
+
return clonedArray as any
|
|
103
110
|
}
|
|
104
111
|
|
|
105
112
|
case '[object Uint32Array]': {
|
|
106
113
|
const clonedArray = new Uint32Array(obj.length)
|
|
107
114
|
clonedArray.set(obj)
|
|
108
|
-
|
|
115
|
+
|
|
116
|
+
return clonedArray as any
|
|
109
117
|
}
|
|
110
118
|
|
|
111
119
|
case '[object Float32Array]': {
|
|
112
120
|
const clonedArray = new Float32Array(obj.length)
|
|
113
121
|
clonedArray.set(obj)
|
|
114
|
-
|
|
122
|
+
|
|
123
|
+
return clonedArray as any
|
|
115
124
|
}
|
|
116
125
|
|
|
117
126
|
case '[object Float64Array]': {
|
|
118
127
|
const clonedArray = new Float64Array(obj.length)
|
|
119
128
|
clonedArray.set(obj)
|
|
120
|
-
|
|
129
|
+
|
|
130
|
+
return clonedArray as any
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
case '[object BigInt64Array]': {
|
|
134
|
+
const clonedArray = new BigInt64Array(obj.length)
|
|
135
|
+
clonedArray.set(obj)
|
|
136
|
+
|
|
137
|
+
return clonedArray as any
|
|
121
138
|
}
|
|
122
139
|
|
|
123
140
|
case '[object Date]': {
|
|
124
|
-
return
|
|
141
|
+
return new Date(obj.valueOf()) as any
|
|
125
142
|
}
|
|
126
143
|
|
|
127
144
|
case '[object RegExp]': {
|