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
package/README.md
CHANGED
|
@@ -358,5 +358,16 @@ const result = await speech.changeVoice("Rich");
|
|
|
358
358
|
Call after TTS initialization. Missing names are silent and do not throw.
|
|
359
359
|
Changes apply to subsequent synthesis; already queued audio retains its voice.
|
|
360
360
|
Legacy model backends and unavailable/uninitialized bridges return -1.
|
|
361
|
+
|
|
362
|
+
List the voices packed in the loaded `.dm` (the names `changeVoice()` accepts;
|
|
363
|
+
the first is the default):
|
|
364
|
+
|
|
365
|
+
```ts
|
|
366
|
+
const voices = await speech.getAllVoices();
|
|
367
|
+
// e.g. ["Ariana", "Gloria", "Hanna", "Jenny", "Kate", "Matthew", "Rich"]
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
Resolves `[]` when no ex2 `.dm` is loaded, the `.dm` has no voices, or the
|
|
371
|
+
bridge is unavailable.
|
|
361
372
|
The existing speak speed argument still applies, with pitch preserved.
|
|
362
373
|
Rebuild the native app after updating the bundled AAR/XCFramework.
|
package/TTSRNBridge.podspec
CHANGED
|
@@ -2,7 +2,7 @@ require 'json'
|
|
|
2
2
|
|
|
3
3
|
Pod::Spec.new do |s|
|
|
4
4
|
s.name = "TTSRNBridge"
|
|
5
|
-
s.version = "1.0.
|
|
5
|
+
s.version = "1.0.401" # Update to your package version
|
|
6
6
|
s.summary = "TTS for React Native."
|
|
7
7
|
s.description = <<-DESC
|
|
8
8
|
A React Native module for tts .
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
8f7632a348c787a68e9282f3ce8e48dc tts-1.0.0.aar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
86d0f842139d70bec863c85b3d86f56d0279124d tts-1.0.0.aar
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
package com.davoice.tts.rn;
|
|
3
3
|
|
|
4
4
|
import androidx.annotation.Nullable;
|
|
5
|
+
import com.facebook.react.bridge.Arguments;
|
|
5
6
|
import com.facebook.react.bridge.Promise;
|
|
6
7
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
7
8
|
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
8
9
|
import com.facebook.react.bridge.ReactMethod;
|
|
9
10
|
import com.facebook.react.bridge.ReadableMap;
|
|
11
|
+
import com.facebook.react.bridge.WritableArray;
|
|
10
12
|
import com.facebook.react.bridge.WritableMap;
|
|
11
13
|
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
12
14
|
// ADD
|
|
@@ -357,6 +359,20 @@ public class DaVoiceTTSBridge extends ReactContextBaseJavaModule {
|
|
|
357
359
|
return null;
|
|
358
360
|
}
|
|
359
361
|
|
|
362
|
+
// Voices available in the loaded .dm; [] when none (or no ttsv2 .dm).
|
|
363
|
+
@ReactMethod
|
|
364
|
+
public void getAllVoices(Promise promise) {
|
|
365
|
+
WritableArray voices = Arguments.createArray();
|
|
366
|
+
try {
|
|
367
|
+
if (tts != null) {
|
|
368
|
+
for (String name : tts.getAllVoices()) voices.pushString(name);
|
|
369
|
+
}
|
|
370
|
+
} catch (Exception ignored) {
|
|
371
|
+
voices = Arguments.createArray();
|
|
372
|
+
}
|
|
373
|
+
promise.resolve(voices);
|
|
374
|
+
}
|
|
375
|
+
|
|
360
376
|
@ReactMethod
|
|
361
377
|
public void changeVoice(String name, Promise promise) {
|
|
362
378
|
try {
|
|
@@ -1203,6 +1203,12 @@ RCT_EXPORT_METHOD(setAECEnabled:(BOOL)enabled
|
|
|
1203
1203
|
resolve(@(YES));
|
|
1204
1204
|
}
|
|
1205
1205
|
|
|
1206
|
+
RCT_EXPORT_METHOD(getAllVoices:(RCTPromiseResolveBlock)resolve
|
|
1207
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
1208
|
+
{
|
|
1209
|
+
resolve(self.tts ? ([self.tts getAllVoices] ?: @[]) : @[]);
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1206
1212
|
RCT_EXPORT_METHOD(changeVoice:(NSString *)name
|
|
1207
1213
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
1208
1214
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
@@ -276,6 +276,12 @@ RCT_EXPORT_METHOD(initTTS:(NSDictionary *)configDict
|
|
|
276
276
|
}];
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
+
RCT_EXPORT_METHOD(getAllVoices:(RCTPromiseResolveBlock)resolve
|
|
280
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
281
|
+
{
|
|
282
|
+
resolve(self.ttsInstance ? ([self.ttsInstance getAllVoices] ?: @[]) : @[]);
|
|
283
|
+
}
|
|
284
|
+
|
|
279
285
|
RCT_EXPORT_METHOD(changeVoice:(NSString *)name
|
|
280
286
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
281
287
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
<key>BinaryPath</key>
|
|
9
9
|
<string>DavoiceTTS.framework/DavoiceTTS</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-
|
|
11
|
+
<string>ios-arm64</string>
|
|
12
12
|
<key>LibraryPath</key>
|
|
13
13
|
<string>DavoiceTTS.framework</string>
|
|
14
14
|
<key>SupportedArchitectures</key>
|
|
15
15
|
<array>
|
|
16
16
|
<string>arm64</string>
|
|
17
|
-
<string>x86_64</string>
|
|
18
17
|
</array>
|
|
19
18
|
<key>SupportedPlatform</key>
|
|
20
19
|
<string>ios</string>
|
|
21
|
-
<key>SupportedPlatformVariant</key>
|
|
22
|
-
<string>simulator</string>
|
|
23
20
|
</dict>
|
|
24
21
|
<dict>
|
|
25
22
|
<key>BinaryPath</key>
|
|
26
23
|
<string>DavoiceTTS.framework/DavoiceTTS</string>
|
|
27
24
|
<key>LibraryIdentifier</key>
|
|
28
|
-
<string>ios-
|
|
25
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
29
26
|
<key>LibraryPath</key>
|
|
30
27
|
<string>DavoiceTTS.framework</string>
|
|
31
28
|
<key>SupportedArchitectures</key>
|
|
32
29
|
<array>
|
|
33
30
|
<string>arm64</string>
|
|
31
|
+
<string>x86_64</string>
|
|
34
32
|
</array>
|
|
35
33
|
<key>SupportedPlatform</key>
|
|
36
34
|
<string>ios</string>
|
|
35
|
+
<key>SupportedPlatformVariant</key>
|
|
36
|
+
<string>simulator</string>
|
|
37
37
|
</dict>
|
|
38
38
|
</array>
|
|
39
39
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
@@ -350,6 +350,10 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
|
|
|
350
350
|
+ (void)setUseDavoiceProprietaryPhonemizer:(BOOL)enabled;
|
|
351
351
|
+ (BOOL)getUseDavoiceProprietaryPhonemizer SWIFT_WARN_UNUSED_RESULT;
|
|
352
352
|
- (BOOL)isUsingDavoiceProprietaryPhonemizer SWIFT_WARN_UNUSED_RESULT;
|
|
353
|
+
/// Voices available in the loaded .dm (the names changeVoice() accepts, the
|
|
354
|
+
/// first being the default). Empty for v1 models, a .dm without voices, or
|
|
355
|
+
/// after destroy().
|
|
356
|
+
- (NSArray<NSString *> * _Nonnull)getAllVoices SWIFT_WARN_UNUSED_RESULT;
|
|
353
357
|
- (void)changeVoice:(NSString * _Nonnull)name completion:(void (^ _Nonnull)(NSInteger))completion;
|
|
354
358
|
@property (nonatomic, copy) void (^ _Nullable onLastUtteranceFinished)(void);
|
|
355
359
|
+ (BOOL)activateLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
|