react-native-davoice-tts 1.0.357 → 1.0.358

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.
Files changed (27) hide show
  1. package/TTSRNBridge.podspec +1 -1
  2. package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar +0 -0
  3. package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar.md5 +1 -1
  4. package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar.sha1 +1 -1
  5. package/ios/SpeechBridge/SpeechBridge.m +30 -0
  6. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/DavoiceTTS +0 -0
  7. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +10 -1
  8. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +1047 -478
  9. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +12 -0
  10. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  11. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +12 -0
  12. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/DavoiceTTS +0 -0
  13. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +20 -2
  14. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +1047 -478
  15. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +12 -0
  16. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  17. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +12 -0
  18. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +1047 -478
  19. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +12 -0
  20. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  21. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +12 -0
  22. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeDirectory +0 -0
  23. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeRequirements-1 +0 -0
  24. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeResources +33 -33
  25. package/ios/TTSRNBridge/libphonemes.xcframework/Info.plist +5 -5
  26. package/package.json +1 -1
  27. package/speech/index.ts +60 -0
@@ -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.270" # Update to your package version
5
+ s.version = "1.0.275" # 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 .
@@ -1 +1 @@
1
- f07da2a503082f7ec8c4229ab2f9eb6e tts-1.0.0.aar
1
+ df8b1b6ae1a732a2ee67656b7879677d tts-1.0.0.aar
@@ -1 +1 @@
1
- cd33c8cf35ede335dff2424fa1cc83fe0c20a7cc tts-1.0.0.aar
1
+ 00a559125ed3cc276def548fdacf9661ddeebefb tts-1.0.0.aar
@@ -424,6 +424,36 @@ RCT_EXPORT_METHOD(isLicenseValid:(NSString *)licenseKey
424
424
  });
425
425
  }
426
426
 
427
+ /// Stores the speech library's routing config before STT/TTS initialization.
428
+ /// DaVoice will prefer this config and only fall back to the wakeword library when absent.
429
+ RCT_EXPORT_METHOD(setAudioRoutingConfig:(NSString *)jsonConfig
430
+ resolver:(RCTPromiseResolveBlock)resolve
431
+ rejecter:(RCTPromiseRejectBlock)reject)
432
+ {
433
+ if (jsonConfig.length == 0) {
434
+ reject(@"AudioRoutingConfigError", @"Audio routing config JSON is empty", nil);
435
+ return;
436
+ }
437
+
438
+ BOOL accepted = [DaVoiceAudioRoutingConfig setAudioRoutingConfigJSONString:jsonConfig];
439
+ if (!accepted) {
440
+ reject(@"AudioRoutingConfigError",
441
+ @"Audio routing config must be valid JSON with a top-level 'default' object",
442
+ nil);
443
+ return;
444
+ }
445
+
446
+ RCTLogInfo(@"[SpeechBridge] stored direct audio routing config before initialization");
447
+ resolve(@"ok");
448
+ }
449
+
450
+ RCT_EXPORT_METHOD(clearAudioRoutingConfig:(RCTPromiseResolveBlock)resolve
451
+ rejecter:(RCTPromiseRejectBlock)reject)
452
+ {
453
+ [DaVoiceAudioRoutingConfig clearAudioRoutingConfig];
454
+ resolve(@"ok");
455
+ }
456
+
427
457
  /// initAll({ locale: "en-US", model: "/path/model.onnx", timeoutMs?: 8000 })
428
458
  RCT_EXPORT_METHOD(initAll:(NSDictionary *)opts
429
459
  resolver:(RCTPromiseResolveBlock)resolve
@@ -308,6 +308,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
308
308
  #if defined(__OBJC__)
309
309
 
310
310
  @class NSString;
311
+ /// Stores the speech library’s audio-routing JSON before STT/TTS initialization.
312
+ /// DaVoice prefers this direct config and falls back to the wakeword library’s config.
313
+ SWIFT_CLASS("_TtC10DavoiceTTS25DaVoiceAudioRoutingConfig")
314
+ @interface DaVoiceAudioRoutingConfig : NSObject
315
+ + (BOOL)setAudioRoutingConfigJSONString:(NSString * _Nonnull)json SWIFT_WARN_UNUSED_RESULT;
316
+ + (void)clearAudioRoutingConfig;
317
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
318
+ @end
319
+
311
320
  @class NSURL;
312
321
  @class NSUUID;
313
322
  @class AVAudioPCMBuffer;
@@ -331,7 +340,7 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
331
340
  - (AVAudioPCMBuffer * _Nullable)synthesize_top:(NSString * _Nonnull)_text speakerId:(int32_t)speakerId token:(NSUUID * _Nonnull)token speed_adjuster:(float)speed_adjuster error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
332
341
  /// Queue an external WAV file for playback via the same AEC path/queue used by speak().
333
342
  /// If called repeatedly, items are queued in order. <code>onLastUtteranceFinished</code> fires
334
- /// after THIS file finishes (unless you enqueue more later and mark those as last).
343
+ /// after the complete queue drains and its audio-session policy is restored.
335
344
  - (void)playWav:(NSURL * _Nonnull)url markAsLastUtterance:(BOOL)markAsLastUtterance;
336
345
  /// Queue an in-memory PCM buffer (any format) for playback via the same AEC path/queue.
337
346
  /// We resample/normalize, write a temp WAV, then enqueue it (so it uses the engine hook).