react-native-davoice-tts 1.0.408 → 1.0.410
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 +14 -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 +14 -0
- package/ios/SpeechBridge/SpeechBridge.m +7 -0
- package/ios/TTSRNBridge/DaVoiceTTSBridge.m +7 -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 +7 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +221 -50
- 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 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +221 -50
- 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 +221 -50
- 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 +9 -0
- package/speech/index.ts +20 -0
package/README.md
CHANGED
|
@@ -369,5 +369,19 @@ const voices = await speech.getAllVoices();
|
|
|
369
369
|
|
|
370
370
|
Resolves `[]` when no ex2 `.dm` is loaded, the `.dm` has no voices, or the
|
|
371
371
|
bridge is unavailable.
|
|
372
|
+
|
|
373
|
+
#### Voice styles ("abilities")
|
|
374
|
+
|
|
375
|
+
Some voices ship style variants. List them, then use ElevenLabs-style tags in
|
|
376
|
+
the text: free text in square brackets before the words it applies to. A tag
|
|
377
|
+
applies until the next tag; `[regular]` returns to the normal voice. Tags are
|
|
378
|
+
never spoken, and a tag that matches nothing uses the normal voice.
|
|
379
|
+
|
|
380
|
+
```ts
|
|
381
|
+
await speech.getVoiceAbilities("Rich");
|
|
382
|
+
// ["angry_whisper", "disappointed", ..., "military_sergeant_hard", ..., "whisper"]
|
|
383
|
+
await speech.changeVoice("Rich");
|
|
384
|
+
await speech.speak("Ok, [drill sergeant] Private, give me 50 push-ups! [regular] And you, Daniel, come with me.");
|
|
385
|
+
```
|
|
372
386
|
The existing speak speed argument still applies, with pitch preserved.
|
|
373
387
|
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.407" # 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
|
+
794126a740b738465c38c2ded528dd94 tts-1.0.0.aar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
169e02c895631c9d9b3a4d6bdd33d872c4c82646 tts-1.0.0.aar
|
|
@@ -373,6 +373,20 @@ public class DaVoiceTTSBridge extends ReactContextBaseJavaModule {
|
|
|
373
373
|
promise.resolve(voices);
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
+
// Style variants ("abilities") of a voice in the loaded .dm; [] when none.
|
|
377
|
+
@ReactMethod
|
|
378
|
+
public void getVoiceAbilities(String name, Promise promise) {
|
|
379
|
+
WritableArray abilities = Arguments.createArray();
|
|
380
|
+
try {
|
|
381
|
+
if (tts != null && name != null) {
|
|
382
|
+
for (String ability : tts.getVoiceAbilities(name)) abilities.pushString(ability);
|
|
383
|
+
}
|
|
384
|
+
} catch (Exception ignored) {
|
|
385
|
+
abilities = Arguments.createArray();
|
|
386
|
+
}
|
|
387
|
+
promise.resolve(abilities);
|
|
388
|
+
}
|
|
389
|
+
|
|
376
390
|
@ReactMethod
|
|
377
391
|
public void changeVoice(String name, Promise promise) {
|
|
378
392
|
try {
|
|
@@ -1209,6 +1209,13 @@ RCT_EXPORT_METHOD(getAllVoices:(RCTPromiseResolveBlock)resolve
|
|
|
1209
1209
|
resolve(self.tts ? ([self.tts getAllVoices] ?: @[]) : @[]);
|
|
1210
1210
|
}
|
|
1211
1211
|
|
|
1212
|
+
RCT_EXPORT_METHOD(getVoiceAbilities:(NSString *)name
|
|
1213
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
1214
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
1215
|
+
{
|
|
1216
|
+
resolve(self.tts && name ? ([self.tts getVoiceAbilities:name] ?: @[]) : @[]);
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1212
1219
|
RCT_EXPORT_METHOD(changeVoice:(NSString *)name
|
|
1213
1220
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
1214
1221
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
@@ -282,6 +282,13 @@ RCT_EXPORT_METHOD(getAllVoices:(RCTPromiseResolveBlock)resolve
|
|
|
282
282
|
resolve(self.ttsInstance ? ([self.ttsInstance getAllVoices] ?: @[]) : @[]);
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
+
RCT_EXPORT_METHOD(getVoiceAbilities:(NSString *)name
|
|
286
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
287
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
288
|
+
{
|
|
289
|
+
resolve(self.ttsInstance && name ? ([self.ttsInstance getVoiceAbilities:name] ?: @[]) : @[]);
|
|
290
|
+
}
|
|
291
|
+
|
|
285
292
|
RCT_EXPORT_METHOD(changeVoice:(NSString *)name
|
|
286
293
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
287
294
|
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
|
|
@@ -354,6 +354,13 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
|
|
|
354
354
|
/// first being the default). Empty for v1 models, a .dm without voices, or
|
|
355
355
|
/// after destroy().
|
|
356
356
|
- (NSArray<NSString *> * _Nonnull)getAllVoices SWIFT_WARN_UNUSED_RESULT;
|
|
357
|
+
/// Style variants (“abilities”) of a voice in the loaded .dm, e.g.
|
|
358
|
+
/// getVoiceAbilities(“Rich”) -> [“angry_whisper”, …, “military_sergeant_hard”, …].
|
|
359
|
+
/// Use them with ElevenLabs-style “[free text]” tags in speak() text, before
|
|
360
|
+
/// the words they apply to, until the next tag: “Ok, [drill sergeant] give me
|
|
361
|
+
/// 50! [regular] Thanks.” Unmatched tags use the default voice; tags are never
|
|
362
|
+
/// spoken. Empty for voices without variants, v1 models, or after destroy().
|
|
363
|
+
- (NSArray<NSString *> * _Nonnull)getVoiceAbilities:(NSString * _Nonnull)name SWIFT_WARN_UNUSED_RESULT;
|
|
357
364
|
- (void)changeVoice:(NSString * _Nonnull)name completion:(void (^ _Nonnull)(NSInteger))completion;
|
|
358
365
|
@property (nonatomic, copy) void (^ _Nullable onLastUtteranceFinished)(void);
|
|
359
366
|
+ (BOOL)activateLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
|