react-native-davoice-tts 1.0.372 → 1.0.374
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/README.md +18 -0
- 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/android/src/main/java/com/davoice/tts/rn/DaVoiceTTSBridge.java +9 -0
- package/android/src/main/libs/MyLibrary-release.aar +0 -0
- package/ios/SpeechBridge/SpeechBridge.m +8 -0
- package/ios/TTSRNBridge/DaVoiceTTSBridge.m +9 -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 +519 -226
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +5 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +5 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/TtsV2Notices.txt +208 -0
- 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 +519 -226
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +5 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +5 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +519 -226
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +5 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +5 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/TtsV2Notices.txt +208 -0
- 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 +48 -33
- package/package.json +1 -1
- package/speech/index.ts +15 -0
|
@@ -112,6 +112,7 @@ public enum AudioPlaybackHook {
|
|
|
112
112
|
public enum Source {
|
|
113
113
|
case fileURL(Foundation.URL)
|
|
114
114
|
case named(Swift.String)
|
|
115
|
+
case ttsv2(DavoiceTTS.TtsV2PCMStream)
|
|
115
116
|
}
|
|
116
117
|
@objc final public func audioPlayerDidFinishPlaying(_ p: AVFAudio.AVAudioPlayer, successfully ok: Swift.Bool)
|
|
117
118
|
final public func activatePlaybackOnlySession()
|
|
@@ -134,6 +135,7 @@ public enum AudioPlaybackHook {
|
|
|
134
135
|
get
|
|
135
136
|
}
|
|
136
137
|
}
|
|
138
|
+
@objc(changeVoice:completion:) final public func changeVoice(_ name: Swift.String, completion: @escaping (Swift.Int) -> Swift.Void)
|
|
137
139
|
@objc final public var onLastUtteranceFinished: (() -> Swift.Void)?
|
|
138
140
|
@objc deinit
|
|
139
141
|
@objc public static func activateLicense(licenseKey: Swift.String) -> Swift.Bool
|
|
@@ -271,6 +273,9 @@ public enum SpeakerVerificationError : Swift.Error, Swift.CustomStringConvertibl
|
|
|
271
273
|
@objc override dynamic public init()
|
|
272
274
|
@objc deinit
|
|
273
275
|
}
|
|
276
|
+
@_hasMissingDesignatedInitializers final public class TtsV2PCMStream {
|
|
277
|
+
@objc deinit
|
|
278
|
+
}
|
|
274
279
|
extension DavoiceTTS.DaVoiceTTS.NumberFormatStyle : Swift.Equatable {}
|
|
275
280
|
extension DavoiceTTS.DaVoiceTTS.NumberFormatStyle : Swift.Hashable {}
|
|
276
281
|
extension DavoiceTTS.DaVoiceTTS.NumberFormatStyle : Swift.RawRepresentable {}
|
|
Binary file
|
|
@@ -112,6 +112,7 @@ public enum AudioPlaybackHook {
|
|
|
112
112
|
public enum Source {
|
|
113
113
|
case fileURL(Foundation.URL)
|
|
114
114
|
case named(Swift.String)
|
|
115
|
+
case ttsv2(DavoiceTTS.TtsV2PCMStream)
|
|
115
116
|
}
|
|
116
117
|
@objc final public func audioPlayerDidFinishPlaying(_ p: AVFAudio.AVAudioPlayer, successfully ok: Swift.Bool)
|
|
117
118
|
final public func activatePlaybackOnlySession()
|
|
@@ -134,6 +135,7 @@ public enum AudioPlaybackHook {
|
|
|
134
135
|
get
|
|
135
136
|
}
|
|
136
137
|
}
|
|
138
|
+
@objc(changeVoice:completion:) final public func changeVoice(_ name: Swift.String, completion: @escaping (Swift.Int) -> Swift.Void)
|
|
137
139
|
@objc final public var onLastUtteranceFinished: (() -> Swift.Void)?
|
|
138
140
|
@objc deinit
|
|
139
141
|
@objc public static func activateLicense(licenseKey: Swift.String) -> Swift.Bool
|
|
@@ -271,6 +273,9 @@ public enum SpeakerVerificationError : Swift.Error, Swift.CustomStringConvertibl
|
|
|
271
273
|
@objc override dynamic public init()
|
|
272
274
|
@objc deinit
|
|
273
275
|
}
|
|
276
|
+
@_hasMissingDesignatedInitializers final public class TtsV2PCMStream {
|
|
277
|
+
@objc deinit
|
|
278
|
+
}
|
|
274
279
|
extension DavoiceTTS.DaVoiceTTS.NumberFormatStyle : Swift.Equatable {}
|
|
275
280
|
extension DavoiceTTS.DaVoiceTTS.NumberFormatStyle : Swift.Hashable {}
|
|
276
281
|
extension DavoiceTTS.DaVoiceTTS.NumberFormatStyle : Swift.RawRepresentable {}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
ttsv2 third-party notices
|
|
2
|
+
|
|
3
|
+
SentencePiece v0.2.1, Copyright Google LLC.
|
|
4
|
+
Inference follows the KevinAHM quantized ONNX export and Kyutai implementation.
|
|
5
|
+
Model and reference recording permissions are separate from this code license.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Apache License
|
|
9
|
+
Version 2.0, January 2004
|
|
10
|
+
http://www.apache.org/licenses/
|
|
11
|
+
|
|
12
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
13
|
+
|
|
14
|
+
1. Definitions.
|
|
15
|
+
|
|
16
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
17
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
18
|
+
|
|
19
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
20
|
+
the copyright owner that is granting the License.
|
|
21
|
+
|
|
22
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
23
|
+
other entities that control, are controlled by, or are under common
|
|
24
|
+
control with that entity. For the purposes of this definition,
|
|
25
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
26
|
+
direction or management of such entity, whether by contract or
|
|
27
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
28
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
29
|
+
|
|
30
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
31
|
+
exercising permissions granted by this License.
|
|
32
|
+
|
|
33
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
34
|
+
including but not limited to software source code, documentation
|
|
35
|
+
source, and configuration files.
|
|
36
|
+
|
|
37
|
+
"Object" form shall mean any form resulting from mechanical
|
|
38
|
+
transformation or translation of a Source form, including but
|
|
39
|
+
not limited to compiled object code, generated documentation,
|
|
40
|
+
and conversions to other media types.
|
|
41
|
+
|
|
42
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
43
|
+
Object form, made available under the License, as indicated by a
|
|
44
|
+
copyright notice that is included in or attached to the work
|
|
45
|
+
(an example is provided in the Appendix below).
|
|
46
|
+
|
|
47
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
48
|
+
form, that is based on (or derived from) the Work and for which the
|
|
49
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
50
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
51
|
+
of this License, Derivative Works shall not include works that remain
|
|
52
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
53
|
+
the Work and Derivative Works thereof.
|
|
54
|
+
|
|
55
|
+
"Contribution" shall mean any work of authorship, including
|
|
56
|
+
the original version of the Work and any modifications or additions
|
|
57
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
58
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
59
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
60
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
61
|
+
means any form of electronic, verbal, or written communication sent
|
|
62
|
+
to the Licensor or its representatives, including but not limited to
|
|
63
|
+
communication on electronic mailing lists, source code control systems,
|
|
64
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
65
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
66
|
+
excluding communication that is conspicuously marked or otherwise
|
|
67
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
68
|
+
|
|
69
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
70
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
71
|
+
subsequently incorporated within the Work.
|
|
72
|
+
|
|
73
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
77
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
78
|
+
Work and such Derivative Works in Source or Object form.
|
|
79
|
+
|
|
80
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
81
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
82
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
83
|
+
(except as stated in this section) patent license to make, have made,
|
|
84
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
85
|
+
where such license applies only to those patent claims licensable
|
|
86
|
+
by such Contributor that are necessarily infringed by their
|
|
87
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
88
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
89
|
+
institute patent litigation against any entity (including a
|
|
90
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
91
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
92
|
+
or contributory patent infringement, then any patent licenses
|
|
93
|
+
granted to You under this License for that Work shall terminate
|
|
94
|
+
as of the date such litigation is filed.
|
|
95
|
+
|
|
96
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
97
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
98
|
+
modifications, and in Source or Object form, provided that You
|
|
99
|
+
meet the following conditions:
|
|
100
|
+
|
|
101
|
+
(a) You must give any other recipients of the Work or
|
|
102
|
+
Derivative Works a copy of this License; and
|
|
103
|
+
|
|
104
|
+
(b) You must cause any modified files to carry prominent notices
|
|
105
|
+
stating that You changed the files; and
|
|
106
|
+
|
|
107
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
108
|
+
that You distribute, all copyright, patent, trademark, and
|
|
109
|
+
attribution notices from the Source form of the Work,
|
|
110
|
+
excluding those notices that do not pertain to any part of
|
|
111
|
+
the Derivative Works; and
|
|
112
|
+
|
|
113
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
114
|
+
distribution, then any Derivative Works that You distribute must
|
|
115
|
+
include a readable copy of the attribution notices contained
|
|
116
|
+
within such NOTICE file, excluding those notices that do not
|
|
117
|
+
pertain to any part of the Derivative Works, in at least one
|
|
118
|
+
of the following places: within a NOTICE text file distributed
|
|
119
|
+
as part of the Derivative Works; within the Source form or
|
|
120
|
+
documentation, if provided along with the Derivative Works; or,
|
|
121
|
+
within a display generated by the Derivative Works, if and
|
|
122
|
+
wherever such third-party notices normally appear. The contents
|
|
123
|
+
of the NOTICE file are for informational purposes only and
|
|
124
|
+
do not modify the License. You may add Your own attribution
|
|
125
|
+
notices within Derivative Works that You distribute, alongside
|
|
126
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
127
|
+
that such additional attribution notices cannot be construed
|
|
128
|
+
as modifying the License.
|
|
129
|
+
|
|
130
|
+
You may add Your own copyright statement to Your modifications and
|
|
131
|
+
may provide additional or different license terms and conditions
|
|
132
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
133
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
134
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
135
|
+
the conditions stated in this License.
|
|
136
|
+
|
|
137
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
138
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
139
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
140
|
+
this License, without any additional terms or conditions.
|
|
141
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
142
|
+
the terms of any separate license agreement you may have executed
|
|
143
|
+
with Licensor regarding such Contributions.
|
|
144
|
+
|
|
145
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
146
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
147
|
+
except as required for reasonable and customary use in describing the
|
|
148
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
149
|
+
|
|
150
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
151
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
152
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
153
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
154
|
+
implied, including, without limitation, any warranties or conditions
|
|
155
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
156
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
157
|
+
appropriateness of using or redistributing the Work and assume any
|
|
158
|
+
risks associated with Your exercise of permissions under this License.
|
|
159
|
+
|
|
160
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
161
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
162
|
+
unless required by applicable law (such as deliberate and grossly
|
|
163
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
164
|
+
liable to You for damages, including any direct, indirect, special,
|
|
165
|
+
incidental, or consequential damages of any character arising as a
|
|
166
|
+
result of this License or out of the use or inability to use the
|
|
167
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
168
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
169
|
+
other commercial damages or losses), even if such Contributor
|
|
170
|
+
has been advised of the possibility of such damages.
|
|
171
|
+
|
|
172
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
173
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
174
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
175
|
+
or other liability obligations and/or rights consistent with this
|
|
176
|
+
License. However, in accepting such obligations, You may act only
|
|
177
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
178
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
179
|
+
defend, and hold each Contributor harmless for any liability
|
|
180
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
181
|
+
of your accepting any such warranty or additional liability.
|
|
182
|
+
|
|
183
|
+
END OF TERMS AND CONDITIONS
|
|
184
|
+
|
|
185
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
186
|
+
|
|
187
|
+
To apply the Apache License to your work, attach the following
|
|
188
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
189
|
+
replaced with your own identifying information. (Don't include
|
|
190
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
191
|
+
comment syntax for the file format. We also recommend that a
|
|
192
|
+
file or class name and description of purpose be included on the
|
|
193
|
+
same "printed page" as the copyright notice for easier
|
|
194
|
+
identification within third-party archives.
|
|
195
|
+
|
|
196
|
+
Copyright [yyyy] [name of copyright owner]
|
|
197
|
+
|
|
198
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
199
|
+
you may not use this file except in compliance with the License.
|
|
200
|
+
You may obtain a copy of the License at
|
|
201
|
+
|
|
202
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
203
|
+
|
|
204
|
+
Unless required by applicable law or agreed to in writing, software
|
|
205
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
206
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
207
|
+
See the License for the specific language governing permissions and
|
|
208
|
+
limitations under the License.
|
|
Binary file
|
|
Binary file
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Headers/DavoiceTTS-Swift.h</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
LA1X81fpGWMIpWEl2xyGjSKJdjA=
|
|
10
10
|
</data>
|
|
11
11
|
<key>Info.plist</key>
|
|
12
12
|
<data>
|
|
@@ -14,48 +14,52 @@
|
|
|
14
14
|
</data>
|
|
15
15
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
kI6WdO9pEBbyk6GLCHYik/Nggmk=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
JO7y5r7sbI//tSBUAI8rKodBX2w=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
iq3OaAzyHiDBe4/cAlOPIehwKkk=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
JO7y5r7sbI//tSBUAI8rKodBX2w=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
n38tH+rSjReJTOoJ+tSexxExQtA=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
kI6WdO9pEBbyk6GLCHYik/Nggmk=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
zOJcrk2QPadwB7laNymoimx19jI=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
45
|
+
cRP1oPvhfGGx+4nRtR9VMqVZPFM=
|
|
46
46
|
</data>
|
|
47
47
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
48
48
|
<data>
|
|
49
|
-
|
|
49
|
+
zOJcrk2QPadwB7laNymoimx19jI=
|
|
50
50
|
</data>
|
|
51
51
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
52
52
|
<data>
|
|
53
|
-
|
|
53
|
+
FkH3yTNBOI4ZfCkMeySJUEk1q7s=
|
|
54
54
|
</data>
|
|
55
55
|
<key>Modules/module.modulemap</key>
|
|
56
56
|
<data>
|
|
57
57
|
msWUQ3rnN5xodJw3mAMUgtovezY=
|
|
58
58
|
</data>
|
|
59
|
+
<key>TtsV2Notices.txt</key>
|
|
60
|
+
<data>
|
|
61
|
+
d68BsT8kKn3J3AthgGdhA9jBrOs=
|
|
62
|
+
</data>
|
|
59
63
|
</dict>
|
|
60
64
|
<key>files2</key>
|
|
61
65
|
<dict>
|
|
@@ -63,121 +67,121 @@
|
|
|
63
67
|
<dict>
|
|
64
68
|
<key>hash</key>
|
|
65
69
|
<data>
|
|
66
|
-
|
|
70
|
+
LA1X81fpGWMIpWEl2xyGjSKJdjA=
|
|
67
71
|
</data>
|
|
68
72
|
<key>hash2</key>
|
|
69
73
|
<data>
|
|
70
|
-
|
|
74
|
+
nhca3OG2DSDMTaQoh0xUmZon3+n8yYEZh1HF55Xbxtg=
|
|
71
75
|
</data>
|
|
72
76
|
</dict>
|
|
73
77
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
74
78
|
<dict>
|
|
75
79
|
<key>hash</key>
|
|
76
80
|
<data>
|
|
77
|
-
|
|
81
|
+
kI6WdO9pEBbyk6GLCHYik/Nggmk=
|
|
78
82
|
</data>
|
|
79
83
|
<key>hash2</key>
|
|
80
84
|
<data>
|
|
81
|
-
|
|
85
|
+
DCiQt0BepKgiECkFYDUPhzMMhGIja3mvHRMYMn0fLao=
|
|
82
86
|
</data>
|
|
83
87
|
</dict>
|
|
84
88
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
85
89
|
<dict>
|
|
86
90
|
<key>hash</key>
|
|
87
91
|
<data>
|
|
88
|
-
|
|
92
|
+
JO7y5r7sbI//tSBUAI8rKodBX2w=
|
|
89
93
|
</data>
|
|
90
94
|
<key>hash2</key>
|
|
91
95
|
<data>
|
|
92
|
-
|
|
96
|
+
VdckrteGN8Dj08FgGyYMsfA7y3hw/1Z7iukBoMfOuCc=
|
|
93
97
|
</data>
|
|
94
98
|
</dict>
|
|
95
99
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
96
100
|
<dict>
|
|
97
101
|
<key>hash</key>
|
|
98
102
|
<data>
|
|
99
|
-
|
|
103
|
+
iq3OaAzyHiDBe4/cAlOPIehwKkk=
|
|
100
104
|
</data>
|
|
101
105
|
<key>hash2</key>
|
|
102
106
|
<data>
|
|
103
|
-
|
|
107
|
+
QxIQBi++vT1r2hxhgrWu/uiHpblgU16j8EqsQ/84dUk=
|
|
104
108
|
</data>
|
|
105
109
|
</dict>
|
|
106
110
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
107
111
|
<dict>
|
|
108
112
|
<key>hash</key>
|
|
109
113
|
<data>
|
|
110
|
-
|
|
114
|
+
JO7y5r7sbI//tSBUAI8rKodBX2w=
|
|
111
115
|
</data>
|
|
112
116
|
<key>hash2</key>
|
|
113
117
|
<data>
|
|
114
|
-
|
|
118
|
+
VdckrteGN8Dj08FgGyYMsfA7y3hw/1Z7iukBoMfOuCc=
|
|
115
119
|
</data>
|
|
116
120
|
</dict>
|
|
117
121
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
118
122
|
<dict>
|
|
119
123
|
<key>hash</key>
|
|
120
124
|
<data>
|
|
121
|
-
|
|
125
|
+
n38tH+rSjReJTOoJ+tSexxExQtA=
|
|
122
126
|
</data>
|
|
123
127
|
<key>hash2</key>
|
|
124
128
|
<data>
|
|
125
|
-
|
|
129
|
+
jat7SjmK/zKB6hxNdGqxw+lRexw96mQTTQNRo3DJ2HM=
|
|
126
130
|
</data>
|
|
127
131
|
</dict>
|
|
128
132
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
129
133
|
<dict>
|
|
130
134
|
<key>hash</key>
|
|
131
135
|
<data>
|
|
132
|
-
|
|
136
|
+
kI6WdO9pEBbyk6GLCHYik/Nggmk=
|
|
133
137
|
</data>
|
|
134
138
|
<key>hash2</key>
|
|
135
139
|
<data>
|
|
136
|
-
|
|
140
|
+
DCiQt0BepKgiECkFYDUPhzMMhGIja3mvHRMYMn0fLao=
|
|
137
141
|
</data>
|
|
138
142
|
</dict>
|
|
139
143
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
140
144
|
<dict>
|
|
141
145
|
<key>hash</key>
|
|
142
146
|
<data>
|
|
143
|
-
|
|
147
|
+
zOJcrk2QPadwB7laNymoimx19jI=
|
|
144
148
|
</data>
|
|
145
149
|
<key>hash2</key>
|
|
146
150
|
<data>
|
|
147
|
-
|
|
151
|
+
0MVBzWJijrPUQn2Mna4Jrfbo1MGfcz5wCCaqXJCEweQ=
|
|
148
152
|
</data>
|
|
149
153
|
</dict>
|
|
150
154
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
151
155
|
<dict>
|
|
152
156
|
<key>hash</key>
|
|
153
157
|
<data>
|
|
154
|
-
|
|
158
|
+
cRP1oPvhfGGx+4nRtR9VMqVZPFM=
|
|
155
159
|
</data>
|
|
156
160
|
<key>hash2</key>
|
|
157
161
|
<data>
|
|
158
|
-
|
|
162
|
+
1um5C0AtIvIr5vYb+ahATi4r8Z+qtUxihj2NgudYuoQ=
|
|
159
163
|
</data>
|
|
160
164
|
</dict>
|
|
161
165
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
162
166
|
<dict>
|
|
163
167
|
<key>hash</key>
|
|
164
168
|
<data>
|
|
165
|
-
|
|
169
|
+
zOJcrk2QPadwB7laNymoimx19jI=
|
|
166
170
|
</data>
|
|
167
171
|
<key>hash2</key>
|
|
168
172
|
<data>
|
|
169
|
-
|
|
173
|
+
0MVBzWJijrPUQn2Mna4Jrfbo1MGfcz5wCCaqXJCEweQ=
|
|
170
174
|
</data>
|
|
171
175
|
</dict>
|
|
172
176
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
173
177
|
<dict>
|
|
174
178
|
<key>hash</key>
|
|
175
179
|
<data>
|
|
176
|
-
|
|
180
|
+
FkH3yTNBOI4ZfCkMeySJUEk1q7s=
|
|
177
181
|
</data>
|
|
178
182
|
<key>hash2</key>
|
|
179
183
|
<data>
|
|
180
|
-
|
|
184
|
+
65HYja0dzhRciuTV2fwhDwJKaNSEoURMbNO3xE66yZw=
|
|
181
185
|
</data>
|
|
182
186
|
</dict>
|
|
183
187
|
<key>Modules/module.modulemap</key>
|
|
@@ -191,6 +195,17 @@
|
|
|
191
195
|
X8EMB/Z5Eqzgc2iqyzdMRmISxoFtSrIHi+n3BM3d71E=
|
|
192
196
|
</data>
|
|
193
197
|
</dict>
|
|
198
|
+
<key>TtsV2Notices.txt</key>
|
|
199
|
+
<dict>
|
|
200
|
+
<key>hash</key>
|
|
201
|
+
<data>
|
|
202
|
+
d68BsT8kKn3J3AthgGdhA9jBrOs=
|
|
203
|
+
</data>
|
|
204
|
+
<key>hash2</key>
|
|
205
|
+
<data>
|
|
206
|
+
OU3QJWrSBizv+fHsEQwyP1ZwOQPh2CWqF48VhQTqD1s=
|
|
207
|
+
</data>
|
|
208
|
+
</dict>
|
|
194
209
|
</dict>
|
|
195
210
|
<key>rules</key>
|
|
196
211
|
<dict>
|
package/package.json
CHANGED
package/speech/index.ts
CHANGED
|
@@ -285,6 +285,21 @@ class Speech {
|
|
|
285
285
|
if (r) r();
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
+
/** Reference voice, matched case-insensitively without .wav.
|
|
289
|
+
* Returns 0 on match; -1 on fallback/unavailability. Missing names select the
|
|
290
|
+
* first WAV (alphabetical order). Already generated audio keeps its voice.
|
|
291
|
+
*/
|
|
292
|
+
async changeVoice(name: string): Promise<number> {
|
|
293
|
+
const bridge = Platform.OS === 'ios' && !this.iosTtsOnly && this.hasCompletedFullInit
|
|
294
|
+
? NativeSpeech : NativeTTS;
|
|
295
|
+
if ((Platform.OS !== 'android' && Platform.OS !== 'ios') || typeof bridge?.changeVoice !== 'function') return -1;
|
|
296
|
+
try {
|
|
297
|
+
return (await bridge.changeVoice(name)) === 0 ? 0 : -1;
|
|
298
|
+
} catch {
|
|
299
|
+
return -1;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
288
303
|
private _nativeSpeak(text: string, speakerId: number, s: number) {
|
|
289
304
|
const nativeTtsSpeak = () => {
|
|
290
305
|
if (!NativeTTS?.speak) throw new Error('TTS speak not available');
|