react-native-davoice-tts 1.0.271 → 1.0.273

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 (18) hide show
  1. package/TTSRNBridge.podspec +1 -1
  2. package/android/src/main/java/com/davoice/tts/rn/DaVoiceTTSBridge.java +82 -81
  3. package/ios/TTSRNBridge/DavoiceTTS.xcframework/Info.plist +5 -5
  4. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/DavoiceTTS +0 -0
  5. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +3166 -3166
  6. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +27 -27
  7. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +27 -27
  8. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/DavoiceTTS +0 -0
  9. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +2964 -2964
  10. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +12 -12
  11. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +12 -12
  12. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +2964 -2964
  13. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +12 -12
  14. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +12 -12
  15. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeDirectory +0 -0
  16. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeRequirements-1 +0 -0
  17. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeResources +24 -24
  18. package/package.json +1 -1
@@ -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.144" # Update to your package version
5
+ s.version = "1.0.146" # 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 .
@@ -53,88 +53,89 @@ public class DaVoiceTTSBridge extends ReactContextBaseJavaModule {
53
53
 
54
54
  @ReactMethod
55
55
  public void initTTS(ReadableMap config, Promise promise) {
56
- try {
57
- final String fileName = config.getString("model");
58
- // Basic input debug
59
- Log.i(TAG, "ASSETDBG model raw input='" + fileName + "'");
60
- final String pkg = reactCtx.getPackageName();
61
- Log.i(TAG, "ASSETDBG packageName=" + pkg);
62
- // RN sometimes passes "assets_xxx" (no extension). Print normalized variants.
63
- final String[] candidates = new String[] {
64
- fileName,
65
- fileName + ".mp3",
66
- fileName + ".wav",
67
- fileName + ".dm",
68
- fileName + ".onnx",
69
- fileName + ".json",
70
- };
71
- Log.i(TAG, "ASSETDBG candidates=" + java.util.Arrays.toString(candidates));
72
-
73
- int res =
74
- reactCtx.getResources().getIdentifier(fileName, "raw", pkg);
75
-
76
- if (res != 0) {
77
- Log.i(TAG, "ASSETDBG res!=0" + res);
56
+ // DEBUG CODE
57
+ // try {
58
+ // final String fileName = config.getString("model");
59
+ // // Basic input debug
60
+ // Log.i(TAG, "ASSETDBG model raw input='" + fileName + "'");
61
+ // final String pkg = reactCtx.getPackageName();
62
+ // Log.i(TAG, "ASSETDBG packageName=" + pkg);
63
+ // // RN sometimes passes "assets_xxx" (no extension). Print normalized variants.
64
+ // final String[] candidates = new String[] {
65
+ // fileName,
66
+ // fileName + ".mp3",
67
+ // fileName + ".wav",
68
+ // fileName + ".dm",
69
+ // fileName + ".onnx",
70
+ // fileName + ".json",
71
+ // };
72
+ // Log.i(TAG, "ASSETDBG candidates=" + java.util.Arrays.toString(candidates));
73
+
74
+ // int res =
75
+ // reactCtx.getResources().getIdentifier(fileName, "raw", pkg);
76
+
77
+ // if (res != 0) {
78
+ // Log.i(TAG, "ASSETDBG res!=0" + res);
78
79
 
79
- android.content.res.AssetFileDescriptor afd = reactCtx.getResources().openRawResourceFd(res);
80
- Log.i(TAG, "ASSETDBG res!=0 afd == " + afd);
81
- afd.close();
82
- }
83
- else {
84
- Log.i(TAG, "ASSETDBG res==0" + res);
85
- }
86
-
87
- // Now the important part: res/raw identifier lookup (this is what RN-Sound relies on)
88
- for (String name : candidates) {
89
- try {
90
- int resId = reactCtx.getResources().getIdentifier(name, "raw", pkg);
91
- Log.i(TAG, "ASSETDBG getIdentifier(name='" + name + "', type='raw') => resId=" + resId);
92
-
93
- if (resId != 0) {
94
- // Print extra details about the resource
95
- try {
96
- String entry = reactCtx.getResources().getResourceEntryName(resId);
97
- String type = reactCtx.getResources().getResourceTypeName(resId);
98
- String full = reactCtx.getResources().getResourceName(resId);
99
- Log.i(TAG, "ASSETDBG resource: entry=" + entry + " type=" + type + " full=" + full);
100
- } catch (Exception ignored) {
101
- Log.i(TAG, "ASSETDBG resource name lookup failed (non-fatal) resId=" + resId);
102
- }
103
-
104
- // Try openRawResourceFd (works for non-compressed raw)
105
- try {
106
- android.content.res.AssetFileDescriptor afd =
107
- reactCtx.getResources().openRawResourceFd(resId);
108
-
109
- if (afd == null) {
110
- Log.w(TAG, "ASSETDBG openRawResourceFd returned NULL for resId=" + resId + " (likely compressed) -> will try openRawResource()");
111
- } else {
112
- Log.i(TAG, "ASSETDBG openRawResourceFd OK resId=" + resId
113
- + " startOffset=" + afd.getStartOffset()
114
- + " length=" + afd.getLength()
115
- + " fdValid=" + (afd.getFileDescriptor() != null));
116
- afd.close();
117
- }
118
- } catch (Exception e) {
119
- Log.w(TAG, "ASSETDBG openRawResourceFd FAILED resId=" + resId + " err=" + e.getMessage(), e);
120
- }
121
-
122
- // Always try openRawResource() too (works even if compressed)
123
- try (java.io.InputStream in = reactCtx.getResources().openRawResource(resId)) {
124
- byte[] head = new byte[32];
125
- int n = in.read(head);
126
- Log.i(TAG, "ASSETDBG openRawResource OK resId=" + resId + " firstBytesRead=" + n);
127
- } catch (Exception e) {
128
- Log.w(TAG, "ASSETDBG openRawResource FAILED resId=" + resId + " err=" + e.getMessage(), e);
129
- }
130
- }
131
- } catch (Exception e) {
132
- Log.w(TAG, "ASSETDBG getIdentifier loop exception name='" + name + "' err=" + e.getMessage(), e);
133
- }
134
- }
135
- } catch (Exception e) {
136
- Log.w(TAG, "ASSETDBG list assets failed: " + e.getMessage());
137
- }
80
+ // android.content.res.AssetFileDescriptor afd = reactCtx.getResources().openRawResourceFd(res);
81
+ // Log.i(TAG, "ASSETDBG res!=0 afd == " + afd);
82
+ // afd.close();
83
+ // }
84
+ // else {
85
+ // Log.i(TAG, "ASSETDBG res==0" + res);
86
+ // }
87
+
88
+ // // Now the important part: res/raw identifier lookup (this is what RN-Sound relies on)
89
+ // for (String name : candidates) {
90
+ // try {
91
+ // int resId = reactCtx.getResources().getIdentifier(name, "raw", pkg);
92
+ // Log.i(TAG, "ASSETDBG getIdentifier(name='" + name + "', type='raw') => resId=" + resId);
93
+
94
+ // if (resId != 0) {
95
+ // // Print extra details about the resource
96
+ // try {
97
+ // String entry = reactCtx.getResources().getResourceEntryName(resId);
98
+ // String type = reactCtx.getResources().getResourceTypeName(resId);
99
+ // String full = reactCtx.getResources().getResourceName(resId);
100
+ // Log.i(TAG, "ASSETDBG resource: entry=" + entry + " type=" + type + " full=" + full);
101
+ // } catch (Exception ignored) {
102
+ // Log.i(TAG, "ASSETDBG resource name lookup failed (non-fatal) resId=" + resId);
103
+ // }
104
+
105
+ // // Try openRawResourceFd (works for non-compressed raw)
106
+ // try {
107
+ // android.content.res.AssetFileDescriptor afd =
108
+ // reactCtx.getResources().openRawResourceFd(resId);
109
+
110
+ // if (afd == null) {
111
+ // Log.w(TAG, "ASSETDBG openRawResourceFd returned NULL for resId=" + resId + " (likely compressed) -> will try openRawResource()");
112
+ // } else {
113
+ // Log.i(TAG, "ASSETDBG openRawResourceFd OK resId=" + resId
114
+ // + " startOffset=" + afd.getStartOffset()
115
+ // + " length=" + afd.getLength()
116
+ // + " fdValid=" + (afd.getFileDescriptor() != null));
117
+ // afd.close();
118
+ // }
119
+ // } catch (Exception e) {
120
+ // Log.w(TAG, "ASSETDBG openRawResourceFd FAILED resId=" + resId + " err=" + e.getMessage(), e);
121
+ // }
122
+
123
+ // // Always try openRawResource() too (works even if compressed)
124
+ // try (java.io.InputStream in = reactCtx.getResources().openRawResource(resId)) {
125
+ // byte[] head = new byte[32];
126
+ // int n = in.read(head);
127
+ // Log.i(TAG, "ASSETDBG openRawResource OK resId=" + resId + " firstBytesRead=" + n);
128
+ // } catch (Exception e) {
129
+ // Log.w(TAG, "ASSETDBG openRawResource FAILED resId=" + resId + " err=" + e.getMessage(), e);
130
+ // }
131
+ // }
132
+ // } catch (Exception e) {
133
+ // Log.w(TAG, "ASSETDBG getIdentifier loop exception name='" + name + "' err=" + e.getMessage(), e);
134
+ // }
135
+ // }
136
+ // } catch (Exception e) {
137
+ // Log.w(TAG, "ASSETDBG list assets failed: " + e.getMessage());
138
+ // }
138
139
  try {
139
140
  if (config == null || !config.hasKey("model") || config.isNull("model")) {
140
141
  promise.reject("invalid_config", "Missing required 'model' key");
@@ -8,32 +8,32 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>DavoiceTTS.framework/DavoiceTTS</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>ios-arm64</string>
11
+ <string>ios-arm64_x86_64-simulator</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>
17
18
  </array>
18
19
  <key>SupportedPlatform</key>
19
20
  <string>ios</string>
21
+ <key>SupportedPlatformVariant</key>
22
+ <string>simulator</string>
20
23
  </dict>
21
24
  <dict>
22
25
  <key>BinaryPath</key>
23
26
  <string>DavoiceTTS.framework/DavoiceTTS</string>
24
27
  <key>LibraryIdentifier</key>
25
- <string>ios-arm64_x86_64-simulator</string>
28
+ <string>ios-arm64</string>
26
29
  <key>LibraryPath</key>
27
30
  <string>DavoiceTTS.framework</string>
28
31
  <key>SupportedArchitectures</key>
29
32
  <array>
30
33
  <string>arm64</string>
31
- <string>x86_64</string>
32
34
  </array>
33
35
  <key>SupportedPlatform</key>
34
36
  <string>ios</string>
35
- <key>SupportedPlatformVariant</key>
36
- <string>simulator</string>
37
37
  </dict>
38
38
  </array>
39
39
  <key>CFBundlePackageType</key>