react-native-davoice-tts 1.0.307 → 1.0.308

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 (22) 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 +103 -0
  6. package/ios/TTSRNBridge/DavoiceTTS.xcframework/Info.plist +5 -5
  7. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/DavoiceTTS +0 -0
  8. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +10163 -7774
  9. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +75 -35
  10. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +75 -35
  11. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/DavoiceTTS +0 -0
  12. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +2588 -199
  13. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +40 -0
  14. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +40 -0
  15. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +2588 -199
  16. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +40 -0
  17. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +40 -0
  18. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeDirectory +0 -0
  19. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeRequirements-1 +0 -0
  20. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeResources +24 -39
  21. package/package.json +1 -1
  22. package/speech/index.ts +24 -0
@@ -195,6 +195,44 @@ public enum SpeakerVerificationError : Swift.Error, Swift.CustomStringConvertibl
195
195
  @objc final public func destroy()
196
196
  @objc(speak:sid:) final public func speak(_ txt: Swift.String, sid: Swift.Int32 = 0)
197
197
  @objc(speak:sid:speed:) final public func speak(_ txt: Swift.String, sid: Swift.Int32 = 0, speed: Swift.Float)
198
+ public struct SpeechCleanupConfig {
199
+ public var hiss: Swift.Float
200
+ public var staticNoise: Swift.Float
201
+ public var whiteNoise: Swift.Float
202
+ public var rfNoise: Swift.Float
203
+ public var attackMs: Swift.Double
204
+ public var releaseMs: Swift.Double
205
+ public var noiseFloor: Swift.Float
206
+ public var brightenComp: Swift.Float
207
+ public init(hiss: Swift.Float = 0, staticNoise: Swift.Float = 0, whiteNoise: Swift.Float = 0, rfNoise: Swift.Float = 0, attackMs: Swift.Double = 2.5, releaseMs: Swift.Double = 45.0, noiseFloor: Swift.Float = 0.005, brightenComp: Swift.Float = 0.15)
208
+ public static let off: DavoiceTTS.DaVoiceTTS.SpeechCleanupConfig
209
+ public static let medium: DavoiceTTS.DaVoiceTTS.SpeechCleanupConfig
210
+ public static let aggressive: DavoiceTTS.DaVoiceTTS.SpeechCleanupConfig
211
+ }
212
+ public struct NoiseReductionConfig {
213
+ public var hissAmount: Swift.Float
214
+ public var staticAmount: Swift.Float
215
+ public var whiteNoiseAmount: Swift.Float
216
+ public var rfNoiseAmount: Swift.Float
217
+ public var noiseFloor: Swift.Float
218
+ public var attackMs: Swift.Double
219
+ public var releaseMs: Swift.Double
220
+ public var preserveBrightness: Swift.Float
221
+ public init(hissAmount: Swift.Float = 0.0, staticAmount: Swift.Float = 0.0, whiteNoiseAmount: Swift.Float = 0.0, rfNoiseAmount: Swift.Float = 0.0, noiseFloor: Swift.Float = 0.006, attackMs: Swift.Double = 3.0, releaseMs: Swift.Double = 45.0, preserveBrightness: Swift.Float = 0.75)
222
+ public static let off: DavoiceTTS.DaVoiceTTS.NoiseReductionConfig
223
+ public static let speechCleanup: DavoiceTTS.DaVoiceTTS.NoiseReductionConfig
224
+ }
225
+ public enum SpeechCleanupPreset {
226
+ case off
227
+ case light
228
+ case medium
229
+ case aggressive
230
+ public static func == (a: DavoiceTTS.DaVoiceTTS.SpeechCleanupPreset, b: DavoiceTTS.DaVoiceTTS.SpeechCleanupPreset) -> Swift.Bool
231
+ public func hash(into hasher: inout Swift.Hasher)
232
+ public var hashValue: Swift.Int {
233
+ get
234
+ }
235
+ }
198
236
  @objc final public func synthesize_top(_ _text: Swift.String, speakerId: Swift.Int32 = 0, token: Foundation.UUID, speed_adjuster: Swift.Float) throws -> AVFAudio.AVAudioPCMBuffer
199
237
  @objc final public func playWav(_ url: Foundation.URL, markAsLastUtterance: Swift.Bool = true)
200
238
  @objc final public func playBuffer(_ buffer: AVFAudio.AVAudioPCMBuffer, markAsLastUtterance: Swift.Bool = true)
@@ -202,3 +240,5 @@ public enum SpeakerVerificationError : Swift.Error, Swift.CustomStringConvertibl
202
240
  extension DavoiceTTS.SVLogLevel : Swift.Equatable {}
203
241
  extension DavoiceTTS.SVLogLevel : Swift.Hashable {}
204
242
  extension DavoiceTTS.SVLogLevel : Swift.RawRepresentable {}
243
+ extension DavoiceTTS.DaVoiceTTS.SpeechCleanupPreset : Swift.Equatable {}
244
+ extension DavoiceTTS.DaVoiceTTS.SpeechCleanupPreset : Swift.Hashable {}
@@ -195,6 +195,44 @@ public enum SpeakerVerificationError : Swift.Error, Swift.CustomStringConvertibl
195
195
  @objc final public func destroy()
196
196
  @objc(speak:sid:) final public func speak(_ txt: Swift.String, sid: Swift.Int32 = 0)
197
197
  @objc(speak:sid:speed:) final public func speak(_ txt: Swift.String, sid: Swift.Int32 = 0, speed: Swift.Float)
198
+ public struct SpeechCleanupConfig {
199
+ public var hiss: Swift.Float
200
+ public var staticNoise: Swift.Float
201
+ public var whiteNoise: Swift.Float
202
+ public var rfNoise: Swift.Float
203
+ public var attackMs: Swift.Double
204
+ public var releaseMs: Swift.Double
205
+ public var noiseFloor: Swift.Float
206
+ public var brightenComp: Swift.Float
207
+ public init(hiss: Swift.Float = 0, staticNoise: Swift.Float = 0, whiteNoise: Swift.Float = 0, rfNoise: Swift.Float = 0, attackMs: Swift.Double = 2.5, releaseMs: Swift.Double = 45.0, noiseFloor: Swift.Float = 0.005, brightenComp: Swift.Float = 0.15)
208
+ public static let off: DavoiceTTS.DaVoiceTTS.SpeechCleanupConfig
209
+ public static let medium: DavoiceTTS.DaVoiceTTS.SpeechCleanupConfig
210
+ public static let aggressive: DavoiceTTS.DaVoiceTTS.SpeechCleanupConfig
211
+ }
212
+ public struct NoiseReductionConfig {
213
+ public var hissAmount: Swift.Float
214
+ public var staticAmount: Swift.Float
215
+ public var whiteNoiseAmount: Swift.Float
216
+ public var rfNoiseAmount: Swift.Float
217
+ public var noiseFloor: Swift.Float
218
+ public var attackMs: Swift.Double
219
+ public var releaseMs: Swift.Double
220
+ public var preserveBrightness: Swift.Float
221
+ public init(hissAmount: Swift.Float = 0.0, staticAmount: Swift.Float = 0.0, whiteNoiseAmount: Swift.Float = 0.0, rfNoiseAmount: Swift.Float = 0.0, noiseFloor: Swift.Float = 0.006, attackMs: Swift.Double = 3.0, releaseMs: Swift.Double = 45.0, preserveBrightness: Swift.Float = 0.75)
222
+ public static let off: DavoiceTTS.DaVoiceTTS.NoiseReductionConfig
223
+ public static let speechCleanup: DavoiceTTS.DaVoiceTTS.NoiseReductionConfig
224
+ }
225
+ public enum SpeechCleanupPreset {
226
+ case off
227
+ case light
228
+ case medium
229
+ case aggressive
230
+ public static func == (a: DavoiceTTS.DaVoiceTTS.SpeechCleanupPreset, b: DavoiceTTS.DaVoiceTTS.SpeechCleanupPreset) -> Swift.Bool
231
+ public func hash(into hasher: inout Swift.Hasher)
232
+ public var hashValue: Swift.Int {
233
+ get
234
+ }
235
+ }
198
236
  @objc final public func synthesize_top(_ _text: Swift.String, speakerId: Swift.Int32 = 0, token: Foundation.UUID, speed_adjuster: Swift.Float) throws -> AVFAudio.AVAudioPCMBuffer
199
237
  @objc final public func playWav(_ url: Foundation.URL, markAsLastUtterance: Swift.Bool = true)
200
238
  @objc final public func playBuffer(_ buffer: AVFAudio.AVAudioPCMBuffer, markAsLastUtterance: Swift.Bool = true)
@@ -202,3 +240,5 @@ public enum SpeakerVerificationError : Swift.Error, Swift.CustomStringConvertibl
202
240
  extension DavoiceTTS.SVLogLevel : Swift.Equatable {}
203
241
  extension DavoiceTTS.SVLogLevel : Swift.Hashable {}
204
242
  extension DavoiceTTS.SVLogLevel : Swift.RawRepresentable {}
243
+ extension DavoiceTTS.DaVoiceTTS.SpeechCleanupPreset : Swift.Equatable {}
244
+ extension DavoiceTTS.DaVoiceTTS.SpeechCleanupPreset : Swift.Hashable {}
@@ -4,10 +4,6 @@
4
4
  <dict>
5
5
  <key>files</key>
6
6
  <dict>
7
- <key>DaVoiceSTT.swift.AEC.CRASH.ETC</key>
8
- <data>
9
- 1HXUyscT+JXKH+nU2GfQ+vypDpg=
10
- </data>
11
7
  <key>Headers/DavoiceTTS-Swift.h</key>
12
8
  <data>
13
9
  oPI/EK4v9rLVeZz0HFu9GfLUZyc=
@@ -18,11 +14,11 @@
18
14
  </data>
19
15
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
20
16
  <data>
21
- 51azGNyZYhiw80odXSRffAby668=
17
+ 0+yIRshFr6kRZf4TXztQzVJMhu0=
22
18
  </data>
23
19
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
24
20
  <data>
25
- Tu+A6MkR6VvdyX5gNDq8wOa1o20=
21
+ 4aR8+XBh/25rJxINOThIvU5IGZo=
26
22
  </data>
27
23
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
28
24
  <data>
@@ -30,19 +26,19 @@
30
26
  </data>
31
27
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
32
28
  <data>
33
- Tu+A6MkR6VvdyX5gNDq8wOa1o20=
29
+ 4aR8+XBh/25rJxINOThIvU5IGZo=
34
30
  </data>
35
31
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
36
32
  <data>
37
- D4zfJMNNEVGduFmbzaDUaKprXiY=
33
+ wHKHm6/A88jO1fjd3mq0kyE4t84=
38
34
  </data>
39
35
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
40
36
  <data>
41
- 51azGNyZYhiw80odXSRffAby668=
37
+ 0+yIRshFr6kRZf4TXztQzVJMhu0=
42
38
  </data>
43
39
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
44
40
  <data>
45
- QroUUgR5IbtyHx83HJQJkSu9NpI=
41
+ B2zwfeGz0DEM2v4UJSypMto7k+s=
46
42
  </data>
47
43
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
48
44
  <data>
@@ -50,11 +46,11 @@
50
46
  </data>
51
47
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
52
48
  <data>
53
- QroUUgR5IbtyHx83HJQJkSu9NpI=
49
+ B2zwfeGz0DEM2v4UJSypMto7k+s=
54
50
  </data>
55
51
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
56
52
  <data>
57
- nTAuxNl8i09qm3eC30pX+btjXMU=
53
+ i/3BPRQ1/gpAX6OXKJqS+KIH0yw=
58
54
  </data>
59
55
  <key>Modules/module.modulemap</key>
60
56
  <data>
@@ -63,17 +59,6 @@
63
59
  </dict>
64
60
  <key>files2</key>
65
61
  <dict>
66
- <key>DaVoiceSTT.swift.AEC.CRASH.ETC</key>
67
- <dict>
68
- <key>hash</key>
69
- <data>
70
- 1HXUyscT+JXKH+nU2GfQ+vypDpg=
71
- </data>
72
- <key>hash2</key>
73
- <data>
74
- SSgZBoZMlDrpnJg06fTFGi7D3/xBaRddearOo7k21Z0=
75
- </data>
76
- </dict>
77
62
  <key>Headers/DavoiceTTS-Swift.h</key>
78
63
  <dict>
79
64
  <key>hash</key>
@@ -89,22 +74,22 @@
89
74
  <dict>
90
75
  <key>hash</key>
91
76
  <data>
92
- 51azGNyZYhiw80odXSRffAby668=
77
+ 0+yIRshFr6kRZf4TXztQzVJMhu0=
93
78
  </data>
94
79
  <key>hash2</key>
95
80
  <data>
96
- pmL18VoBByrt/3U2kgE/yw68mMm9XwTHud71v24KRnk=
81
+ WeOPltfDp3Z2FqvRjsUX7nypydylhUY0WOJd2fkd7lk=
97
82
  </data>
98
83
  </dict>
99
84
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
100
85
  <dict>
101
86
  <key>hash</key>
102
87
  <data>
103
- Tu+A6MkR6VvdyX5gNDq8wOa1o20=
88
+ 4aR8+XBh/25rJxINOThIvU5IGZo=
104
89
  </data>
105
90
  <key>hash2</key>
106
91
  <data>
107
- YMHZOFRbYW7VzbMppE2BMoHiQhQQ93++1QRP09Zz1eA=
92
+ FUNNEE0u43EgOAOBPuF/u1dq5651LRytK3Eyd3QxbjM=
108
93
  </data>
109
94
  </dict>
110
95
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
@@ -122,44 +107,44 @@
122
107
  <dict>
123
108
  <key>hash</key>
124
109
  <data>
125
- Tu+A6MkR6VvdyX5gNDq8wOa1o20=
110
+ 4aR8+XBh/25rJxINOThIvU5IGZo=
126
111
  </data>
127
112
  <key>hash2</key>
128
113
  <data>
129
- YMHZOFRbYW7VzbMppE2BMoHiQhQQ93++1QRP09Zz1eA=
114
+ FUNNEE0u43EgOAOBPuF/u1dq5651LRytK3Eyd3QxbjM=
130
115
  </data>
131
116
  </dict>
132
117
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
133
118
  <dict>
134
119
  <key>hash</key>
135
120
  <data>
136
- D4zfJMNNEVGduFmbzaDUaKprXiY=
121
+ wHKHm6/A88jO1fjd3mq0kyE4t84=
137
122
  </data>
138
123
  <key>hash2</key>
139
124
  <data>
140
- GyxfgwkUqpLGoPArxCh43arCS+zVaFMcfaChMq6OS64=
125
+ erX0XXm5jLi3zfBnJgOcEVpf0PQWusaHwb2tn48NRiA=
141
126
  </data>
142
127
  </dict>
143
128
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
144
129
  <dict>
145
130
  <key>hash</key>
146
131
  <data>
147
- 51azGNyZYhiw80odXSRffAby668=
132
+ 0+yIRshFr6kRZf4TXztQzVJMhu0=
148
133
  </data>
149
134
  <key>hash2</key>
150
135
  <data>
151
- pmL18VoBByrt/3U2kgE/yw68mMm9XwTHud71v24KRnk=
136
+ WeOPltfDp3Z2FqvRjsUX7nypydylhUY0WOJd2fkd7lk=
152
137
  </data>
153
138
  </dict>
154
139
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
155
140
  <dict>
156
141
  <key>hash</key>
157
142
  <data>
158
- QroUUgR5IbtyHx83HJQJkSu9NpI=
143
+ B2zwfeGz0DEM2v4UJSypMto7k+s=
159
144
  </data>
160
145
  <key>hash2</key>
161
146
  <data>
162
- jAdDuVU+hPdCMqikNp6KZaiuHF2J+orjcs+Ng6ikAQ8=
147
+ +6lgxQg1wuWkMdgLonZ+2JH1L+n/k1sbSVEt4MuaUQE=
163
148
  </data>
164
149
  </dict>
165
150
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
@@ -177,22 +162,22 @@
177
162
  <dict>
178
163
  <key>hash</key>
179
164
  <data>
180
- QroUUgR5IbtyHx83HJQJkSu9NpI=
165
+ B2zwfeGz0DEM2v4UJSypMto7k+s=
181
166
  </data>
182
167
  <key>hash2</key>
183
168
  <data>
184
- jAdDuVU+hPdCMqikNp6KZaiuHF2J+orjcs+Ng6ikAQ8=
169
+ +6lgxQg1wuWkMdgLonZ+2JH1L+n/k1sbSVEt4MuaUQE=
185
170
  </data>
186
171
  </dict>
187
172
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
188
173
  <dict>
189
174
  <key>hash</key>
190
175
  <data>
191
- nTAuxNl8i09qm3eC30pX+btjXMU=
176
+ i/3BPRQ1/gpAX6OXKJqS+KIH0yw=
192
177
  </data>
193
178
  <key>hash2</key>
194
179
  <data>
195
- 3uNl7D4Gi0P3KRfSlMXgP4IXfMD7N21NkA755BRLOeA=
180
+ jR970mZUvurxBAa0y9vy+nSPaKFgTVIkyQmNIBT1GNw=
196
181
  </data>
197
182
  </dict>
198
183
  <key>Modules/module.modulemap</key>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-davoice-tts",
3
- "version": "1.0.307",
3
+ "version": "1.0.308",
4
4
  "description": "tts library for React Native",
5
5
  "main": "tts/index.js",
6
6
  "types": "tts/index.d.ts",
package/speech/index.ts CHANGED
@@ -700,6 +700,30 @@ class Speech {
700
700
  return Promise.resolve(0);
701
701
  }
702
702
 
703
+ async hasIOSMicPermissions(): Promise<boolean> {
704
+ if (Platform.OS !== 'ios') return false;
705
+ if (!NativeSpeech?.hasMicPermissions) return false;
706
+ return !!(await NativeSpeech.hasMicPermissions());
707
+ }
708
+
709
+ async requestIOSMicPermissions(wait_timeout: number): Promise<boolean> {
710
+ if (Platform.OS !== 'ios') return false;
711
+ if (!NativeSpeech?.requestMicPermissions) return false;
712
+ return !!(await NativeSpeech.requestMicPermissions(wait_timeout));
713
+ }
714
+
715
+ async hasIOSSpeechRecognitionPermissions(): Promise<boolean> {
716
+ if (Platform.OS !== 'ios') return false;
717
+ if (!NativeSpeech?.hasSpeechRecognitionPermissions) return false;
718
+ return !!(await NativeSpeech.hasSpeechRecognitionPermissions());
719
+ }
720
+
721
+ async requestIOSSpeechRecognitionPermissions(wait_timeout: number): Promise<boolean> {
722
+ if (Platform.OS !== 'ios') return false;
723
+ if (!NativeSpeech?.requestSpeechRecognitionPermissions) return false;
724
+ return !!(await NativeSpeech.requestSpeechRecognitionPermissions(wait_timeout));
725
+ }
726
+
703
727
  // ---------- TTS ----------
704
728
  async initTTS(modelOrConfig: ModelRef | { model: ModelRef }) {
705
729
  const cfg =