react-native-davoice 1.0.28 → 1.0.31
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 +1 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +7510 -7201
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +32 -18
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +32 -18
- 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 +2 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +9646 -9337
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +102 -88
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +102 -88
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +9646 -9337
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +102 -88
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +102 -88
- 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.253" # 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
|
+
ce4aa4dc86cc3eb0856d133171027d42 tts-1.0.0.aar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3d4da3dd6a6f3f157344c3404b3a123d01685810 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
|
|
@@ -316,6 +316,7 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
|
|
|
316
316
|
@property (nonatomic, copy) void (^ _Nullable onLastUtteranceFinished)(void);
|
|
317
317
|
+ (BOOL)activateLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
|
|
318
318
|
- (BOOL)setLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
|
|
319
|
+
- (void)setUseEuropeanNumberFormat:(BOOL)enabled;
|
|
319
320
|
- (nullable instancetype)initWithModel:(NSURL * _Nonnull)model error:(NSError * _Nullable * _Nullable)error OBJC_DESIGNATED_INITIALIZER;
|
|
320
321
|
/// Immediately stop speaking: cancels future synthesis work and flushes all playback.
|
|
321
322
|
- (void)stopSpeaking;
|