react-native-davoice 1.0.30 → 1.0.32
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/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/ios/TTSRNBridge/DaVoiceTTSBridge.m +24 -1
- 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 +3 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +7096 -6790
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +60 -57
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +60 -57
- 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 +6 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +8182 -7876
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +21 -18
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +21 -18
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +8182 -7876
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +21 -18
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +21 -18
- 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 +27 -27
- package/package.json +1 -1
- package/speech/index.ts +86 -18
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.254" # 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
|
+
874a89994c667873855a73b2659bad66 tts-1.0.0.aar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
f9b3b14256239c8a3b7175fb20223214a572d357 tts-1.0.0.aar
|
|
@@ -99,7 +99,9 @@ RCT_EXPORT_METHOD(initTTS:(NSDictionary *)configDict
|
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
NSURL *modelURL = [
|
|
102
|
+
NSURL *modelURL = [modelPath hasPrefix:@"file://"]
|
|
103
|
+
? [NSURL URLWithString:modelPath]
|
|
104
|
+
: [NSURL fileURLWithPath:modelPath];
|
|
103
105
|
|
|
104
106
|
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{
|
|
105
107
|
NSError *error = nil;
|
|
@@ -110,6 +112,9 @@ RCT_EXPORT_METHOD(initTTS:(NSDictionary *)configDict
|
|
|
110
112
|
}
|
|
111
113
|
|
|
112
114
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
115
|
+
if (self.ttsInstance) {
|
|
116
|
+
@try { [self.ttsInstance stopSpeaking]; [self.ttsInstance destroy]; } @catch (__unused id e) {}
|
|
117
|
+
}
|
|
113
118
|
self.ttsInstance = tts;
|
|
114
119
|
|
|
115
120
|
__weak typeof(self) weakSelf = self;
|
|
@@ -142,6 +147,24 @@ RCT_EXPORT_METHOD(initTTS:(NSDictionary *)configDict
|
|
|
142
147
|
});
|
|
143
148
|
}
|
|
144
149
|
|
|
150
|
+
RCT_EXPORT_METHOD(speakWithSpeed:(NSString *)text
|
|
151
|
+
speakerId:(nonnull NSNumber *)speakerId
|
|
152
|
+
speed:(nonnull NSNumber *)speed
|
|
153
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
154
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
155
|
+
{
|
|
156
|
+
if (!self.ttsInstance) {
|
|
157
|
+
reject(@"no_instance", @"TTS not initialized", nil);
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
162
|
+
float s = speed ? speed.floatValue : 1.0f;
|
|
163
|
+
[self.ttsInstance speak:text sid:speakerId.intValue speed:s];
|
|
164
|
+
resolve(@"Speaking");
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
|
|
145
168
|
RCT_EXPORT_METHOD(stopSpeaking:(RCTPromiseResolveBlock)resolve
|
|
146
169
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
147
170
|
{
|
|
Binary file
|
|
@@ -313,6 +313,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
313
313
|
@class AVAudioPCMBuffer;
|
|
314
314
|
SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
|
|
315
315
|
@interface DaVoiceTTS : NSObject
|
|
316
|
+
+ (void)setUseDavoiceProprietaryPhonemizer:(BOOL)enabled;
|
|
317
|
+
+ (BOOL)getUseDavoiceProprietaryPhonemizer SWIFT_WARN_UNUSED_RESULT;
|
|
318
|
+
- (BOOL)isUsingDavoiceProprietaryPhonemizer SWIFT_WARN_UNUSED_RESULT;
|
|
316
319
|
@property (nonatomic, copy) void (^ _Nullable onLastUtteranceFinished)(void);
|
|
317
320
|
+ (BOOL)activateLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
|
|
318
321
|
- (BOOL)setLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
|