react-native-davoice-tts 1.0.406 → 1.0.407
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 +11 -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 +16 -0
- package/ios/SpeechBridge/SpeechBridge.m +6 -0
- package/ios/TTSRNBridge/DaVoiceTTSBridge.m +6 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/Info.plist +5 -5
- 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 +4 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +404 -121
- 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 +8 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +404 -121
- 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 +404 -121
- 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 -0
- package/speech/index.ts +16 -0
|
@@ -159,6 +159,7 @@ public enum AudioPlaybackHook {
|
|
|
159
159
|
get
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
+
@objc final public func getAllVoices() -> [Swift.String]
|
|
162
163
|
@objc(changeVoice:completion:) final public func changeVoice(_ name: Swift.String, completion: @escaping (Swift.Int) -> Swift.Void)
|
|
163
164
|
@objc final public var onLastUtteranceFinished: (() -> Swift.Void)?
|
|
164
165
|
@objc deinit
|
|
Binary file
|
|
@@ -159,6 +159,7 @@ public enum AudioPlaybackHook {
|
|
|
159
159
|
get
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
+
@objc final public func getAllVoices() -> [Swift.String]
|
|
162
163
|
@objc(changeVoice:completion:) final public func changeVoice(_ name: Swift.String, completion: @escaping (Swift.Int) -> Swift.Void)
|
|
163
164
|
@objc final public var onLastUtteranceFinished: (() -> Swift.Void)?
|
|
164
165
|
@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
|
+
R+WjlWhzt3vGhbBxzcRRs3IHRSQ=
|
|
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
|
+
aRVp1N4Oou/zdN1oK449OMYWkQ8=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
DMLO2s83FqcO9+0Ezik1blpB1sE=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
47EO3zBK+ieILP/flT68fZK3xgg=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
DMLO2s83FqcO9+0Ezik1blpB1sE=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
GQFpEbWd9ztsO60P0ergXusfsP4=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
aRVp1N4Oou/zdN1oK449OMYWkQ8=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
myYkolVESaVDxB3fp+zyf5jBRwg=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
45
|
+
vLDDx8g5AYTZDuzHoTb43NriJ5I=
|
|
46
46
|
</data>
|
|
47
47
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
48
48
|
<data>
|
|
49
|
-
|
|
49
|
+
myYkolVESaVDxB3fp+zyf5jBRwg=
|
|
50
50
|
</data>
|
|
51
51
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
52
52
|
<data>
|
|
53
|
-
|
|
53
|
+
Q118KAme7v7QObUKsHodPY/Iyyc=
|
|
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
|
+
R+WjlWhzt3vGhbBxzcRRs3IHRSQ=
|
|
67
67
|
</data>
|
|
68
68
|
<key>hash2</key>
|
|
69
69
|
<data>
|
|
70
|
-
|
|
70
|
+
ScRP6gmuNcFABmolxLlGUgSb+blAQXCOTCJasUoYPKU=
|
|
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
|
+
aRVp1N4Oou/zdN1oK449OMYWkQ8=
|
|
78
78
|
</data>
|
|
79
79
|
<key>hash2</key>
|
|
80
80
|
<data>
|
|
81
|
-
|
|
81
|
+
WiWQRmpsJEsP9FLzYBD4H3HJ9AuzHgIRDeZ1y/oJkEg=
|
|
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
|
+
DMLO2s83FqcO9+0Ezik1blpB1sE=
|
|
89
89
|
</data>
|
|
90
90
|
<key>hash2</key>
|
|
91
91
|
<data>
|
|
92
|
-
|
|
92
|
+
wk+Y93YINE6gHvsECjQRKZt6hnXa5vz+o9pCpu2wjks=
|
|
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
|
+
47EO3zBK+ieILP/flT68fZK3xgg=
|
|
100
100
|
</data>
|
|
101
101
|
<key>hash2</key>
|
|
102
102
|
<data>
|
|
103
|
-
|
|
103
|
+
2mRJt8XVBCMp2qPrRgMbaOpeMfe87Ix7FFvlcZ8zG0c=
|
|
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
|
+
DMLO2s83FqcO9+0Ezik1blpB1sE=
|
|
111
111
|
</data>
|
|
112
112
|
<key>hash2</key>
|
|
113
113
|
<data>
|
|
114
|
-
|
|
114
|
+
wk+Y93YINE6gHvsECjQRKZt6hnXa5vz+o9pCpu2wjks=
|
|
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
|
+
GQFpEbWd9ztsO60P0ergXusfsP4=
|
|
122
122
|
</data>
|
|
123
123
|
<key>hash2</key>
|
|
124
124
|
<data>
|
|
125
|
-
|
|
125
|
+
NZyivWl5UwR1DVhUDJjtRTFEJD+HKiHgZnBCujoXkkw=
|
|
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
|
+
aRVp1N4Oou/zdN1oK449OMYWkQ8=
|
|
133
133
|
</data>
|
|
134
134
|
<key>hash2</key>
|
|
135
135
|
<data>
|
|
136
|
-
|
|
136
|
+
WiWQRmpsJEsP9FLzYBD4H3HJ9AuzHgIRDeZ1y/oJkEg=
|
|
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
|
+
myYkolVESaVDxB3fp+zyf5jBRwg=
|
|
144
144
|
</data>
|
|
145
145
|
<key>hash2</key>
|
|
146
146
|
<data>
|
|
147
|
-
|
|
147
|
+
KhVPiTAHvudIhJzckgOJ+FLPhDyymWjTj8j+RzZn5pY=
|
|
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
|
+
vLDDx8g5AYTZDuzHoTb43NriJ5I=
|
|
155
155
|
</data>
|
|
156
156
|
<key>hash2</key>
|
|
157
157
|
<data>
|
|
158
|
-
|
|
158
|
+
upfzqTnQfWcRiZqrVEt5R9tjoGyacNG3M+iKUaRc4oM=
|
|
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
|
+
myYkolVESaVDxB3fp+zyf5jBRwg=
|
|
166
166
|
</data>
|
|
167
167
|
<key>hash2</key>
|
|
168
168
|
<data>
|
|
169
|
-
|
|
169
|
+
KhVPiTAHvudIhJzckgOJ+FLPhDyymWjTj8j+RzZn5pY=
|
|
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
|
+
Q118KAme7v7QObUKsHodPY/Iyyc=
|
|
177
177
|
</data>
|
|
178
178
|
<key>hash2</key>
|
|
179
179
|
<data>
|
|
180
|
-
|
|
180
|
+
LRsws2ctpmgZZc/BL6oZjpc/vXe9wI5PVY5C+JKWrBc=
|
|
181
181
|
</data>
|
|
182
182
|
</dict>
|
|
183
183
|
<key>Modules/module.modulemap</key>
|
package/package.json
CHANGED
package/speech/index.d.ts
CHANGED
|
@@ -141,6 +141,11 @@ declare class Speech {
|
|
|
141
141
|
private sttTransitionChain;
|
|
142
142
|
private dbgAsset;
|
|
143
143
|
private _onNativeFinishedSpeaking;
|
|
144
|
+
/** Voices available in the loaded .dm (the names changeVoice() accepts; the
|
|
145
|
+
* first is the default). Resolves [] when no ttsv2 .dm is loaded, the .dm has
|
|
146
|
+
* no voices, or the native side is unavailable.
|
|
147
|
+
*/
|
|
148
|
+
getAllVoices(): Promise<string[]>;
|
|
144
149
|
/** Reference voice, matched case-insensitively without .wav.
|
|
145
150
|
* Returns 0 on match; -1 on fallback/unavailability. Missing names select the
|
|
146
151
|
* first WAV (alphabetical order). Already generated audio keeps its voice.
|
package/speech/index.ts
CHANGED
|
@@ -301,6 +301,22 @@ class Speech {
|
|
|
301
301
|
if (r) r();
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
+
/** Voices available in the loaded .dm (the names changeVoice() accepts; the
|
|
305
|
+
* first is the default). Resolves [] when no ttsv2 .dm is loaded, the .dm has
|
|
306
|
+
* no voices, or the native side is unavailable.
|
|
307
|
+
*/
|
|
308
|
+
async getAllVoices(): Promise<string[]> {
|
|
309
|
+
const bridge = Platform.OS === 'ios' && !this.iosTtsOnly && this.hasCompletedFullInit
|
|
310
|
+
? NativeSpeech : NativeTTS;
|
|
311
|
+
if ((Platform.OS !== 'android' && Platform.OS !== 'ios') || typeof bridge?.getAllVoices !== 'function') return [];
|
|
312
|
+
try {
|
|
313
|
+
const voices = await bridge.getAllVoices();
|
|
314
|
+
return Array.isArray(voices) ? voices.filter((v: unknown): v is string => typeof v === 'string') : [];
|
|
315
|
+
} catch {
|
|
316
|
+
return [];
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
304
320
|
/** Reference voice, matched case-insensitively without .wav.
|
|
305
321
|
* Returns 0 on match; -1 on fallback/unavailability. Missing names select the
|
|
306
322
|
* first WAV (alphabetical order). Already generated audio keeps its voice.
|