react-native-davoice-tts 1.0.308 → 1.0.309

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 (31) 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/android/src/main/java/com/davoice/stt/rn/STTModule.kt +27 -0
  6. package/android/src/main/java/com/davoice/tts/rn/DaVoiceTTSBridge.java +27 -0
  7. package/ios/STTRNBridge/STTBridge.m +27 -0
  8. package/ios/SpeechBridge/SpeechBridge.m +32 -0
  9. package/ios/TTSRNBridge/DaVoiceTTSBridge.m +30 -0
  10. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/DavoiceTTS +0 -0
  11. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +10 -1
  12. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +8340 -10292
  13. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +80 -111
  14. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +80 -111
  15. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/DavoiceTTS +0 -0
  16. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +20 -2
  17. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +8866 -10818
  18. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +80 -111
  19. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +80 -111
  20. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +8866 -10818
  21. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +80 -111
  22. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +80 -111
  23. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeDirectory +0 -0
  24. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeRequirements-1 +0 -0
  25. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeResources +27 -27
  26. package/package.json +1 -1
  27. package/speech/index.ts +29 -0
  28. package/stt/index.d.ts +2 -0
  29. package/stt/index.ts +20 -0
  30. package/tts/DaVoiceTTSBridge.d.ts +2 -0
  31. package/tts/DaVoiceTTSBridge.js +8 -0
package/stt/index.d.ts CHANGED
@@ -37,6 +37,8 @@ declare class RCTSTT {
37
37
  start(locale: string, options?: Record<string, any>): Promise<void>;
38
38
  stop(): Promise<void>;
39
39
  cancel(): Promise<void>;
40
+ setLicense(licenseKey: string): Promise<boolean>;
41
+ isLicenseValid(licenseKey: string): Promise<boolean>;
40
42
  isAvailable(): Promise<0 | 1>;
41
43
  isRecognizing(): Promise<0 | 1>;
42
44
  set onSpeechStart(fn: (e: SpeechStartEvent) => void);
package/stt/index.ts CHANGED
@@ -145,6 +145,26 @@ class RCTSTT {
145
145
  });
146
146
  }
147
147
 
148
+ setLicense(licenseKey: string): Promise<boolean> {
149
+ return new Promise((resolve, reject) => {
150
+ if (!STTNative?.setLicense) {
151
+ reject(new Error('STTNative.setLicense not available'));
152
+ return;
153
+ }
154
+ STTNative.setLicense(licenseKey).then(resolve).catch(reject);
155
+ });
156
+ }
157
+
158
+ isLicenseValid(licenseKey: string): Promise<boolean> {
159
+ return new Promise((resolve, reject) => {
160
+ if (!STTNative?.isLicenseValid) {
161
+ reject(new Error('STTNative.isLicenseValid not available'));
162
+ return;
163
+ }
164
+ STTNative.isLicenseValid(licenseKey).then(resolve).catch(reject);
165
+ });
166
+ }
167
+
148
168
  isAvailable(): Promise<0 | 1> {
149
169
  return new Promise((resolve, reject) => {
150
170
  if (!STTNative?.isSpeechAvailable) {
@@ -4,6 +4,8 @@ export class DaVoiceTTSInstance {
4
4
  _emitter: NativeEventEmitter | null;
5
5
  _subs: any[];
6
6
  initTTS(modelOrConfig: any): Promise<any>;
7
+ setLicense(licenseKey: any): Promise<any>;
8
+ isLicenseValid(licenseKey: any): Promise<any>;
7
9
  speak(text: any, speakerId?: number): Promise<any>;
8
10
  stopSpeaking(): Promise<any>;
9
11
  destroy(): Promise<any>;
@@ -28,6 +28,14 @@ export class DaVoiceTTSInstance {
28
28
  return await DaVoiceTTSBridge.initTTS(modelOrConfig);
29
29
  }
30
30
 
31
+ async setLicense(licenseKey) {
32
+ return await DaVoiceTTSBridge.setLicense(licenseKey);
33
+ }
34
+
35
+ async isLicenseValid(licenseKey) {
36
+ return await DaVoiceTTSBridge.isLicenseValid(licenseKey);
37
+ }
38
+
31
39
  async speak(text, speakerId = 0) {
32
40
  return await DaVoiceTTSBridge.speak(text, speakerId);
33
41
  }