react-native-davoice-tts 1.0.413 → 1.0.415
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/LICENSE +31 -0
- package/README.md +4 -0
- package/TTSRNBridge.podspec +1 -1
- package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar +0 -0
- package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar.md5 +1 -1
- package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar.sha1 +1 -1
- package/android/src/main/java/com/davoice/tts/rn/DaVoiceTTSBridge.java +4 -4
- package/ios/SpeechBridge/SpeechBridge.m +4 -3
- package/ios/TTSRNBridge/DaVoiceTTSBridge.m +4 -3
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/DavoiceTTS +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +7 -2
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +167 -105
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +1 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +1 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/DavoiceTTS +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +14 -4
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +167 -105
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +167 -105
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +1 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeResources +33 -33
- package/package.json +1 -1
- package/speech/index.d.ts +5 -3
- package/speech/index.ts +10 -4
|
@@ -165,6 +165,7 @@ public enum AudioPlaybackHook {
|
|
|
165
165
|
@objc(setExternalVoicesPath:completion:) final public func setExternalVoicesPath(_ path: Swift.String?, completion: (([Swift.String]) -> Swift.Void)? = nil)
|
|
166
166
|
#endif
|
|
167
167
|
@objc public static func createVoiceClone(_ inputAudioPath: Swift.String, outputPath: Swift.String, embedderPath: Swift.String) throws -> [Swift.String : Any]
|
|
168
|
+
@objc public static func createVoiceClone(_ inputAudioPath: Swift.String, outputPath: Swift.String, embedderPath: Swift.String, volume: Swift.Double) throws -> [Swift.String : Any]
|
|
168
169
|
@objc(changeVoice:completion:) final public func changeVoice(_ name: Swift.String, completion: @escaping (Swift.Int) -> Swift.Void)
|
|
169
170
|
@objc final public var onLastUtteranceFinished: (() -> Swift.Void)?
|
|
170
171
|
@objc deinit
|
|
Binary file
|
|
@@ -165,6 +165,7 @@ public enum AudioPlaybackHook {
|
|
|
165
165
|
@objc(setExternalVoicesPath:completion:) final public func setExternalVoicesPath(_ path: Swift.String?, completion: (([Swift.String]) -> Swift.Void)? = nil)
|
|
166
166
|
#endif
|
|
167
167
|
@objc public static func createVoiceClone(_ inputAudioPath: Swift.String, outputPath: Swift.String, embedderPath: Swift.String) throws -> [Swift.String : Any]
|
|
168
|
+
@objc public static func createVoiceClone(_ inputAudioPath: Swift.String, outputPath: Swift.String, embedderPath: Swift.String, volume: Swift.Double) throws -> [Swift.String : Any]
|
|
168
169
|
@objc(changeVoice:completion:) final public func changeVoice(_ name: Swift.String, completion: @escaping (Swift.Int) -> Swift.Void)
|
|
169
170
|
@objc final public var onLastUtteranceFinished: (() -> Swift.Void)?
|
|
170
171
|
@objc deinit
|
|
Binary file
|
|
Binary file
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Headers/DavoiceTTS-Swift.h</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
AfU6seDdkByYAtupXwekP5MwNJQ=
|
|
10
10
|
</data>
|
|
11
11
|
<key>Info.plist</key>
|
|
12
12
|
<data>
|
|
@@ -14,43 +14,43 @@
|
|
|
14
14
|
</data>
|
|
15
15
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
SL3NZ9um8qTpXKKI9swa4NUzFqs=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
20
20
|
<data>
|
|
21
|
-
+
|
|
21
|
+
/TvuZa+RBXG5WL0hQqAlmw0+KC0=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
pyRhcSzJtJq2JMRUWPY17tX435U=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
28
28
|
<data>
|
|
29
|
-
+
|
|
29
|
+
/TvuZa+RBXG5WL0hQqAlmw0+KC0=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
tvAYD1HBEtYJVKDsPOzgroXYAs0=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
SL3NZ9um8qTpXKKI9swa4NUzFqs=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
95rPGfs8IOUE2QjIYtXUuegxLCk=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
45
|
+
kJ02kqXE1xiVG3h/oMsQTGMmcx4=
|
|
46
46
|
</data>
|
|
47
47
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
48
48
|
<data>
|
|
49
|
-
|
|
49
|
+
95rPGfs8IOUE2QjIYtXUuegxLCk=
|
|
50
50
|
</data>
|
|
51
51
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
52
52
|
<data>
|
|
53
|
-
|
|
53
|
+
m93dmKbkuTyalKKmHETQBABAZoU=
|
|
54
54
|
</data>
|
|
55
55
|
<key>Modules/module.modulemap</key>
|
|
56
56
|
<data>
|
|
@@ -63,121 +63,121 @@
|
|
|
63
63
|
<dict>
|
|
64
64
|
<key>hash</key>
|
|
65
65
|
<data>
|
|
66
|
-
|
|
66
|
+
AfU6seDdkByYAtupXwekP5MwNJQ=
|
|
67
67
|
</data>
|
|
68
68
|
<key>hash2</key>
|
|
69
69
|
<data>
|
|
70
|
-
|
|
70
|
+
60E5q6/t53EF1IxcrtR2rA5VVkHRSjxDO6uBFLzpKvw=
|
|
71
71
|
</data>
|
|
72
72
|
</dict>
|
|
73
73
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
74
74
|
<dict>
|
|
75
75
|
<key>hash</key>
|
|
76
76
|
<data>
|
|
77
|
-
|
|
77
|
+
SL3NZ9um8qTpXKKI9swa4NUzFqs=
|
|
78
78
|
</data>
|
|
79
79
|
<key>hash2</key>
|
|
80
80
|
<data>
|
|
81
|
-
|
|
81
|
+
W7lam8/sLiialUVnWvygIt3QKvLVzfC2M2GKaxs5iZI=
|
|
82
82
|
</data>
|
|
83
83
|
</dict>
|
|
84
84
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
85
85
|
<dict>
|
|
86
86
|
<key>hash</key>
|
|
87
87
|
<data>
|
|
88
|
-
+
|
|
88
|
+
/TvuZa+RBXG5WL0hQqAlmw0+KC0=
|
|
89
89
|
</data>
|
|
90
90
|
<key>hash2</key>
|
|
91
91
|
<data>
|
|
92
|
-
|
|
92
|
+
+AOQToN/YslpRKYeKnNLBbBzXgJExlcYdjgMzm/7SD4=
|
|
93
93
|
</data>
|
|
94
94
|
</dict>
|
|
95
95
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
96
96
|
<dict>
|
|
97
97
|
<key>hash</key>
|
|
98
98
|
<data>
|
|
99
|
-
|
|
99
|
+
pyRhcSzJtJq2JMRUWPY17tX435U=
|
|
100
100
|
</data>
|
|
101
101
|
<key>hash2</key>
|
|
102
102
|
<data>
|
|
103
|
-
|
|
103
|
+
E5FTXNcKpw2L11nxN8otkRvTGFtXNyoakQQAVReq+sk=
|
|
104
104
|
</data>
|
|
105
105
|
</dict>
|
|
106
106
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
107
107
|
<dict>
|
|
108
108
|
<key>hash</key>
|
|
109
109
|
<data>
|
|
110
|
-
+
|
|
110
|
+
/TvuZa+RBXG5WL0hQqAlmw0+KC0=
|
|
111
111
|
</data>
|
|
112
112
|
<key>hash2</key>
|
|
113
113
|
<data>
|
|
114
|
-
|
|
114
|
+
+AOQToN/YslpRKYeKnNLBbBzXgJExlcYdjgMzm/7SD4=
|
|
115
115
|
</data>
|
|
116
116
|
</dict>
|
|
117
117
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
118
118
|
<dict>
|
|
119
119
|
<key>hash</key>
|
|
120
120
|
<data>
|
|
121
|
-
|
|
121
|
+
tvAYD1HBEtYJVKDsPOzgroXYAs0=
|
|
122
122
|
</data>
|
|
123
123
|
<key>hash2</key>
|
|
124
124
|
<data>
|
|
125
|
-
|
|
125
|
+
hMGw8AiR4ByoiHDSNak+AMa8fKobsvq4lpH/weLUv0Q=
|
|
126
126
|
</data>
|
|
127
127
|
</dict>
|
|
128
128
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
129
129
|
<dict>
|
|
130
130
|
<key>hash</key>
|
|
131
131
|
<data>
|
|
132
|
-
|
|
132
|
+
SL3NZ9um8qTpXKKI9swa4NUzFqs=
|
|
133
133
|
</data>
|
|
134
134
|
<key>hash2</key>
|
|
135
135
|
<data>
|
|
136
|
-
|
|
136
|
+
W7lam8/sLiialUVnWvygIt3QKvLVzfC2M2GKaxs5iZI=
|
|
137
137
|
</data>
|
|
138
138
|
</dict>
|
|
139
139
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
140
140
|
<dict>
|
|
141
141
|
<key>hash</key>
|
|
142
142
|
<data>
|
|
143
|
-
|
|
143
|
+
95rPGfs8IOUE2QjIYtXUuegxLCk=
|
|
144
144
|
</data>
|
|
145
145
|
<key>hash2</key>
|
|
146
146
|
<data>
|
|
147
|
-
|
|
147
|
+
HEziYccowyCWT7NRpF6rhTsV388VUlQs3rcWBwC+30U=
|
|
148
148
|
</data>
|
|
149
149
|
</dict>
|
|
150
150
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
151
151
|
<dict>
|
|
152
152
|
<key>hash</key>
|
|
153
153
|
<data>
|
|
154
|
-
|
|
154
|
+
kJ02kqXE1xiVG3h/oMsQTGMmcx4=
|
|
155
155
|
</data>
|
|
156
156
|
<key>hash2</key>
|
|
157
157
|
<data>
|
|
158
|
-
|
|
158
|
+
mX7sZtKML9HKPDzemyXCkSJfTof5y/h6P/RmD1I/xcA=
|
|
159
159
|
</data>
|
|
160
160
|
</dict>
|
|
161
161
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
162
162
|
<dict>
|
|
163
163
|
<key>hash</key>
|
|
164
164
|
<data>
|
|
165
|
-
|
|
165
|
+
95rPGfs8IOUE2QjIYtXUuegxLCk=
|
|
166
166
|
</data>
|
|
167
167
|
<key>hash2</key>
|
|
168
168
|
<data>
|
|
169
|
-
|
|
169
|
+
HEziYccowyCWT7NRpF6rhTsV388VUlQs3rcWBwC+30U=
|
|
170
170
|
</data>
|
|
171
171
|
</dict>
|
|
172
172
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
173
173
|
<dict>
|
|
174
174
|
<key>hash</key>
|
|
175
175
|
<data>
|
|
176
|
-
|
|
176
|
+
m93dmKbkuTyalKKmHETQBABAZoU=
|
|
177
177
|
</data>
|
|
178
178
|
<key>hash2</key>
|
|
179
179
|
<data>
|
|
180
|
-
|
|
180
|
+
yPab54G/WxLpbIY53LfY3r154Pa0ulTRFYAy9YmoBYc=
|
|
181
181
|
</data>
|
|
182
182
|
</dict>
|
|
183
183
|
<key>Modules/module.modulemap</key>
|
package/package.json
CHANGED
package/speech/index.d.ts
CHANGED
|
@@ -171,7 +171,7 @@ declare class Speech {
|
|
|
171
171
|
*/
|
|
172
172
|
setExternalVoicesPath(path: string | null): Promise<string[]>;
|
|
173
173
|
/** Voice cloning: creates a voice from a recording and saves it as a
|
|
174
|
-
*
|
|
174
|
+
* packed .emd at outputPath.
|
|
175
175
|
*
|
|
176
176
|
* - inputAudio: path/URI of a recording of one speaker (wav, mp3, m4a/aac,
|
|
177
177
|
* ogg, flac, ...). It is prepared for cloning automatically.
|
|
@@ -179,14 +179,16 @@ declare class Speech {
|
|
|
179
179
|
* folder ending in "/" (-> <folder>/<input name>.emd). The file name is the
|
|
180
180
|
* voice name.
|
|
181
181
|
* - embedder: the language's voice encoder embedder_<code>.dm, e.g.
|
|
182
|
-
* require('./assets/models/embedder_en.dm') or a path; it is
|
|
182
|
+
* require('./assets/models/embedder_en.dm') or a path; it is resolved in
|
|
183
183
|
* memory only.
|
|
184
|
+
* - volume: loudness of the voice relative to the recording: 1 keeps it
|
|
185
|
+
* (default), 1.2 is 20% louder, 0.8 is 20% quieter (a number > 0).
|
|
184
186
|
*
|
|
185
187
|
* Resolves { path, voice, warnings }; when warnings is non-empty, ask the user
|
|
186
188
|
* to record again. When the .emd lands in the folder given to setExternalVoicesPath(), the new
|
|
187
189
|
* voice is usable right away.
|
|
188
190
|
*/
|
|
189
|
-
createVoiceClone(inputAudio: ModelRef, outputPath: string, embedder: ModelRef): Promise<VoiceCloneResult>;
|
|
191
|
+
createVoiceClone(inputAudio: ModelRef, outputPath: string, embedder: ModelRef, volume?: number): Promise<VoiceCloneResult>;
|
|
190
192
|
/** Reference voice, matched case-insensitively without .wav.
|
|
191
193
|
* Returns 0 on match; -1 on fallback/unavailability. Missing names select the
|
|
192
194
|
* first WAV (alphabetical order). Already generated audio keeps its voice.
|
package/speech/index.ts
CHANGED
|
@@ -366,7 +366,7 @@ class Speech {
|
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
/** Voice cloning: creates a voice from a recording and saves it as a
|
|
369
|
-
*
|
|
369
|
+
* packed .emd at outputPath.
|
|
370
370
|
*
|
|
371
371
|
* - inputAudio: path/URI of a recording of one speaker (wav, mp3, m4a/aac,
|
|
372
372
|
* ogg, flac, ...). It is prepared for cloning automatically.
|
|
@@ -374,20 +374,26 @@ class Speech {
|
|
|
374
374
|
* folder ending in "/" (-> <folder>/<input name>.emd). The file name is the
|
|
375
375
|
* voice name.
|
|
376
376
|
* - embedder: the language's voice encoder embedder_<code>.dm, e.g.
|
|
377
|
-
* require('./assets/models/embedder_en.dm') or a path; it is
|
|
377
|
+
* require('./assets/models/embedder_en.dm') or a path; it is resolved in
|
|
378
378
|
* memory only.
|
|
379
|
+
* - volume: loudness of the voice relative to the recording: 1 keeps it
|
|
380
|
+
* (default), 1.2 is 20% louder, 0.8 is 20% quieter (a number > 0).
|
|
379
381
|
*
|
|
380
382
|
* Resolves { path, voice, warnings }; when warnings is non-empty, ask the user
|
|
381
383
|
* to record again. When the .emd lands in the folder given to setExternalVoicesPath(), the new
|
|
382
384
|
* voice is usable right away.
|
|
383
385
|
*/
|
|
384
|
-
async createVoiceClone(inputAudio: ModelRef, outputPath: string, embedder: ModelRef
|
|
386
|
+
async createVoiceClone(inputAudio: ModelRef, outputPath: string, embedder: ModelRef,
|
|
387
|
+
volume: number = 1): Promise<VoiceCloneResult> {
|
|
388
|
+
if (typeof volume !== 'number' || !Number.isFinite(volume) || volume <= 0) {
|
|
389
|
+
throw new Error(`createVoiceClone: volume must be a number > 0, got ${String(volume)}`);
|
|
390
|
+
}
|
|
385
391
|
const bridge = (typeof NativeTTS?.createVoiceClone === 'function') ? NativeTTS : NativeSpeech;
|
|
386
392
|
if (typeof bridge?.createVoiceClone !== 'function') {
|
|
387
393
|
throw new Error('createVoiceClone is not available on this platform');
|
|
388
394
|
}
|
|
389
395
|
const result = await bridge.createVoiceClone(
|
|
390
|
-
this.resolveModelToPath(inputAudio), String(outputPath), this.resolveModelToPath(embedder));
|
|
396
|
+
this.resolveModelToPath(inputAudio), String(outputPath), this.resolveModelToPath(embedder), volume);
|
|
391
397
|
const folder = this.externalVoicesPath;
|
|
392
398
|
if (folder && typeof result?.path === 'string') {
|
|
393
399
|
const strip = (p: string) => p.replace(/^file:\/\//, '').replace(/\/+$/, '');
|