react-native-davoice 1.0.4
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 +319 -0
- package/TTSRNBridge.podspec +38 -0
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +47 -0
- 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 -0
- package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar.sha1 +1 -0
- package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.pom +38 -0
- package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.pom.md5 +1 -0
- package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.pom.sha1 +1 -0
- package/android/settings.gradle +2 -0
- package/android/src/main/AndroidManifest.xml +14 -0
- package/android/src/main/java/com/davoice/rn/DaVoicePackage.java +29 -0
- package/android/src/main/java/com/davoice/stt/rn/STTModule.kt +208 -0
- package/android/src/main/java/com/davoice/tts/rn/DaVoiceTTSBridge.java +733 -0
- package/android/src/main/libs/MyLibrary-release.aar +0 -0
- package/app.plugin.js +60 -0
- package/ios/STTRNBridge/STTBridge.h +7 -0
- package/ios/STTRNBridge/STTBridge.m +130 -0
- package/ios/SpeechBridge/SpeechBridge.h +7 -0
- package/ios/SpeechBridge/SpeechBridge.m +761 -0
- package/ios/TTSRNBridge/DaVoiceTTSBridge.h +7 -0
- package/ios/TTSRNBridge/DaVoiceTTSBridge.m +177 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/Info.plist +44 -0
- 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 +424 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Info.plist +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +13253 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +213 -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 +213 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/module.modulemap +4 -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 +844 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Info.plist +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +13253 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +213 -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 +213 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +13253 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +213 -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 +213 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/module.modulemap +4 -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 +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 +282 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeSignature +0 -0
- package/ios/TTSRNBridge/libphonemes.a +0 -0
- package/ios/TTSRNBridge/libucd.a +0 -0
- package/package.json +46 -0
- package/react-native.config.js +10 -0
- package/speech/index.ts +1055 -0
- package/stt/index.d.ts +54 -0
- package/stt/index.ts +222 -0
- package/tts/DaVoiceTTSBridge.d.ts +18 -0
- package/tts/DaVoiceTTSBridge.js +71 -0
- package/tts/index.d.ts +3 -0
- package/tts/index.js +4 -0
package/README.md
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
# react-native-davoice
|
|
2
|
+
|
|
3
|
+
React Native on-device speech package for:
|
|
4
|
+
|
|
5
|
+
- text to speech
|
|
6
|
+
- speech to text
|
|
7
|
+
- unified speech flows that coordinate STT and TTS together
|
|
8
|
+
|
|
9
|
+
It supports iOS and Android and is designed for apps that need a local voice pipeline with native audio-session handling.
|
|
10
|
+
|
|
11
|
+
This package pairs well with `react-native-wakeword`, which covers wake-word, keyword spotting, and related always-listening flows.
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- On-device TTS for React Native
|
|
16
|
+
- On-device STT for React Native
|
|
17
|
+
- Unified `speech/` API that can coordinate STT and TTS together
|
|
18
|
+
- Native event support for speech results, partials, volume, and TTS completion
|
|
19
|
+
- License activation and validation APIs
|
|
20
|
+
- Local model paths, bundled assets, and asset `require(...)` support
|
|
21
|
+
- WAV / audio playback helpers in the unified speech API
|
|
22
|
+
- iOS microphone and speech-recognition permission helpers
|
|
23
|
+
|
|
24
|
+
## Package Layout
|
|
25
|
+
|
|
26
|
+
The package exposes three entry points:
|
|
27
|
+
|
|
28
|
+
- `react-native-davoice`
|
|
29
|
+
Default TTS entry point.
|
|
30
|
+
- `react-native-davoice/stt`
|
|
31
|
+
Standalone speech-to-text API.
|
|
32
|
+
- `react-native-davoice/speech`
|
|
33
|
+
Unified API for apps that use both TTS and STT together.
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install react-native-davoice
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
or
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
yarn add react-native-davoice
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
For iOS:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
cd ios
|
|
51
|
+
pod install
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
React Native autolinking is supported.
|
|
55
|
+
|
|
56
|
+
## When To Use Which API
|
|
57
|
+
|
|
58
|
+
Use `react-native-davoice/speech` if your app uses both STT and TTS and you want one bridge managing the flow.
|
|
59
|
+
|
|
60
|
+
Use `react-native-davoice` if you only need TTS.
|
|
61
|
+
|
|
62
|
+
Use `react-native-davoice/stt` if you only need speech recognition.
|
|
63
|
+
|
|
64
|
+
## Quick Start
|
|
65
|
+
|
|
66
|
+
### Unified Speech API
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
import Speech from 'react-native-davoice/speech';
|
|
70
|
+
|
|
71
|
+
const model = require('./assets/models/model_ex_ariana.dm');
|
|
72
|
+
|
|
73
|
+
await Speech.setLicense('YOUR_LICENSE_KEY');
|
|
74
|
+
await Speech.initAll({
|
|
75
|
+
locale: 'en-US',
|
|
76
|
+
model,
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
Speech.onSpeechResults = (event) => {
|
|
80
|
+
console.log('results', event.value);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
Speech.onSpeechPartialResults = (event) => {
|
|
84
|
+
console.log('partial', event.value);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
Speech.onFinishedSpeaking = () => {
|
|
88
|
+
console.log('finished speaking');
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
await Speech.start('en-US');
|
|
92
|
+
await Speech.speak('Hello from DaVoice', 0, 1.0);
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### TTS Only
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
import { DaVoiceTTSInstance } from 'react-native-davoice';
|
|
99
|
+
|
|
100
|
+
const tts = new DaVoiceTTSInstance();
|
|
101
|
+
|
|
102
|
+
await tts.setLicense('YOUR_LICENSE_KEY');
|
|
103
|
+
await tts.initTTS({
|
|
104
|
+
model: require('./assets/models/model_ex_ariana.dm'),
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
tts.onFinishedSpeaking(() => {
|
|
108
|
+
console.log('done');
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
await tts.speak('Hello world', 0);
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### STT Only
|
|
115
|
+
|
|
116
|
+
```ts
|
|
117
|
+
import STT from 'react-native-davoice/stt';
|
|
118
|
+
|
|
119
|
+
await STT.setLicense('YOUR_LICENSE_KEY');
|
|
120
|
+
|
|
121
|
+
STT.onSpeechResults = (event) => {
|
|
122
|
+
console.log(event.value);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
await STT.start('en-US');
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Unified Speech API
|
|
129
|
+
|
|
130
|
+
The unified API is intended for real voice flows where STT and TTS are part of the same experience.
|
|
131
|
+
|
|
132
|
+
Common methods:
|
|
133
|
+
|
|
134
|
+
- `initAll({ locale, model, timeoutMs?, onboardingJsonPath? })`
|
|
135
|
+
- `destroyAll()`
|
|
136
|
+
- `start(locale, options?)`
|
|
137
|
+
- `stop()`
|
|
138
|
+
- `cancel()`
|
|
139
|
+
- `speak(text, speakerId?, speed?)`
|
|
140
|
+
- `stopSpeaking()`
|
|
141
|
+
- `playWav(pathOrURL, markAsLast?)`
|
|
142
|
+
- `playPCM(data, { sampleRate, channels?, interleaved?, format?, markAsLast? })`
|
|
143
|
+
- `playBuffer({ base64, sampleRate, channels?, interleaved?, format, markAsLast? })`
|
|
144
|
+
- `pauseMicrophone()`
|
|
145
|
+
- `unPauseMicrophone()`
|
|
146
|
+
- `pauseSpeechRecognition()`
|
|
147
|
+
- `unPauseSpeechRecognition(times)`
|
|
148
|
+
- `isAvailable()`
|
|
149
|
+
- `isRecognizing()`
|
|
150
|
+
- `setLicense(licenseKey)`
|
|
151
|
+
- `isLicenseValid(licenseKey)`
|
|
152
|
+
|
|
153
|
+
Unified events:
|
|
154
|
+
|
|
155
|
+
- `onSpeechStart`
|
|
156
|
+
- `onSpeechRecognized`
|
|
157
|
+
- `onSpeechEnd`
|
|
158
|
+
- `onSpeechError`
|
|
159
|
+
- `onSpeechResults`
|
|
160
|
+
- `onSpeechPartialResults`
|
|
161
|
+
- `onSpeechVolumeChanged`
|
|
162
|
+
- `onFinishedSpeaking`
|
|
163
|
+
- `onNewSpeechWAV`
|
|
164
|
+
Android-only remote STT flow event.
|
|
165
|
+
|
|
166
|
+
### iOS Permission Helpers
|
|
167
|
+
|
|
168
|
+
The unified API also exposes iOS permission helpers:
|
|
169
|
+
|
|
170
|
+
- `hasIOSMicPermissions()`
|
|
171
|
+
- `requestIOSMicPermissions(waitTimeout)`
|
|
172
|
+
- `hasIOSSpeechRecognitionPermissions()`
|
|
173
|
+
- `requestIOSSpeechRecognitionPermissions(waitTimeout)`
|
|
174
|
+
|
|
175
|
+
## TTS API
|
|
176
|
+
|
|
177
|
+
TTS is exposed from the package root.
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
import { DaVoiceTTSInstance } from 'react-native-davoice';
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Available methods:
|
|
184
|
+
|
|
185
|
+
- `initTTS({ model })`
|
|
186
|
+
- `setLicense(licenseKey)`
|
|
187
|
+
- `isLicenseValid(licenseKey)`
|
|
188
|
+
- `speak(text, speakerId?)`
|
|
189
|
+
- `stopSpeaking()`
|
|
190
|
+
- `destroy()`
|
|
191
|
+
- `onFinishedSpeaking(callback)`
|
|
192
|
+
|
|
193
|
+
## STT API
|
|
194
|
+
|
|
195
|
+
```ts
|
|
196
|
+
import STT from 'react-native-davoice/stt';
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Available methods:
|
|
200
|
+
|
|
201
|
+
- `start(locale, options?)`
|
|
202
|
+
- `stop()`
|
|
203
|
+
- `cancel()`
|
|
204
|
+
- `destroy()`
|
|
205
|
+
- `isAvailable()`
|
|
206
|
+
- `isRecognizing()`
|
|
207
|
+
- `setLicense(licenseKey)`
|
|
208
|
+
- `isLicenseValid(licenseKey)`
|
|
209
|
+
|
|
210
|
+
Available event handlers:
|
|
211
|
+
|
|
212
|
+
- `onSpeechStart`
|
|
213
|
+
- `onSpeechRecognized`
|
|
214
|
+
- `onSpeechEnd`
|
|
215
|
+
- `onSpeechError`
|
|
216
|
+
- `onSpeechResults`
|
|
217
|
+
- `onSpeechPartialResults`
|
|
218
|
+
- `onSpeechVolumeChanged`
|
|
219
|
+
|
|
220
|
+
## License API
|
|
221
|
+
|
|
222
|
+
All entry points expose the same license helpers:
|
|
223
|
+
|
|
224
|
+
```ts
|
|
225
|
+
await Speech.setLicense(key);
|
|
226
|
+
await Speech.isLicenseValid(key);
|
|
227
|
+
|
|
228
|
+
await tts.setLicense(key);
|
|
229
|
+
await tts.isLicenseValid(key);
|
|
230
|
+
|
|
231
|
+
await STT.setLicense(key);
|
|
232
|
+
await STT.isLicenseValid(key);
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
For the unified `speech/` entry point, `setLicense` applies the license to both STT and TTS under the hood.
|
|
236
|
+
|
|
237
|
+
## Models And Assets
|
|
238
|
+
|
|
239
|
+
Model arguments can be provided as:
|
|
240
|
+
|
|
241
|
+
- a local file path
|
|
242
|
+
- a bundled asset via `require(...)`
|
|
243
|
+
- a file URL
|
|
244
|
+
- in some APIs, a remote URL
|
|
245
|
+
|
|
246
|
+
Typical model formats used by this package include `.dm` and `.onnx`.
|
|
247
|
+
|
|
248
|
+
If your app bundles model files with Metro, make sure your React Native asset configuration includes the extensions you use.
|
|
249
|
+
|
|
250
|
+
## Works Well With react-native-wakeword
|
|
251
|
+
|
|
252
|
+
If your product needs wake word, keyword spotting, or an always-listening front end, pair this package with `react-native-wakeword`.
|
|
253
|
+
|
|
254
|
+
A common production setup is:
|
|
255
|
+
|
|
256
|
+
1. `react-native-wakeword` for wake word and wake-phase audio control.
|
|
257
|
+
2. `react-native-davoice/speech` for STT, TTS, and the active voice session.
|
|
258
|
+
|
|
259
|
+
That separation works well for assistants, hands-free flows, and full on-device voice UX.
|
|
260
|
+
|
|
261
|
+
## Platform Notes
|
|
262
|
+
|
|
263
|
+
### iOS
|
|
264
|
+
|
|
265
|
+
- Run `pod install` after adding or updating the package.
|
|
266
|
+
- Microphone permission is required.
|
|
267
|
+
- Speech recognition permission may also be required for STT flows.
|
|
268
|
+
|
|
269
|
+
### Android
|
|
270
|
+
|
|
271
|
+
- Autolinking is supported.
|
|
272
|
+
- The package includes native Android bridge registration.
|
|
273
|
+
- `onNewSpeechWAV` is Android-only.
|
|
274
|
+
|
|
275
|
+
## Example
|
|
276
|
+
|
|
277
|
+
This README was aligned with the companion DaVoice React Native example app that demonstrates:
|
|
278
|
+
|
|
279
|
+
- TTS model selection
|
|
280
|
+
- STT flows
|
|
281
|
+
- combined speech orchestration
|
|
282
|
+
- integration alongside `react-native-wakeword`
|
|
283
|
+
|
|
284
|
+
## Troubleshooting
|
|
285
|
+
|
|
286
|
+
### Native module not found
|
|
287
|
+
|
|
288
|
+
Make sure:
|
|
289
|
+
|
|
290
|
+
- the package is installed in `node_modules`
|
|
291
|
+
- iOS pods are installed
|
|
292
|
+
- the app was rebuilt after installation
|
|
293
|
+
|
|
294
|
+
### Model file cannot be resolved
|
|
295
|
+
|
|
296
|
+
Check:
|
|
297
|
+
|
|
298
|
+
- the model path is correct
|
|
299
|
+
- the asset was bundled correctly
|
|
300
|
+
- Metro is configured to include the model extension
|
|
301
|
+
|
|
302
|
+
### TTS or STT fails to initialize
|
|
303
|
+
|
|
304
|
+
Check:
|
|
305
|
+
|
|
306
|
+
- the license was set before initialization
|
|
307
|
+
- the model file exists on device
|
|
308
|
+
- required permissions were granted
|
|
309
|
+
|
|
310
|
+
## Support
|
|
311
|
+
|
|
312
|
+
For licensing, production integration, or custom deployments:
|
|
313
|
+
|
|
314
|
+
- Website: [https://davoice.io](https://davoice.io)
|
|
315
|
+
- Email: `info@davoice.io`
|
|
316
|
+
|
|
317
|
+
## License
|
|
318
|
+
|
|
319
|
+
MIT for the React Native wrapper. Native model/runtime licensing may require a commercial DaVoice license depending on your deployment.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
Pod::Spec.new do |s|
|
|
4
|
+
s.name = "TTSRNBridge"
|
|
5
|
+
s.version = "1.0.184" # Update to your package version
|
|
6
|
+
s.summary = "TTS for React Native."
|
|
7
|
+
s.description = <<-DESC
|
|
8
|
+
A React Native module for tts .
|
|
9
|
+
DESC
|
|
10
|
+
s.homepage = "https://github.com/frymanofer/KeywordsDetectionAndroidLibrary.git" # Update with your repo URL
|
|
11
|
+
s.license = { :type => "MIT" } # Update if different
|
|
12
|
+
s.author = { "Your Name" => "ofer@davoice.io" } # Update with your info
|
|
13
|
+
s.platform = :ios, "11"
|
|
14
|
+
# s.source = { :git => "https://github.com/frymanofer/KeywordsDetectionAndroidLibrary.git", :tag => s.version.to_s } # Update accordingly
|
|
15
|
+
s.source = { :path => "." }
|
|
16
|
+
|
|
17
|
+
# s.source_files = "ios/*.{h,m,mm,swift}"
|
|
18
|
+
# s.resources = "ios/TTSRNBridge/models/*"
|
|
19
|
+
# s.source_files = 'ios/TTSRNBridge/DaVoiceTTSBridge.m', 'ios/TTSRNBridge/DaVoiceTTSBridge.h'
|
|
20
|
+
s.source_files = [
|
|
21
|
+
"ios/TTSRNBridge/DaVoiceTTSBridge.{h,m}",
|
|
22
|
+
"ios/STTRNBridge/STTBridge.{h,m}",
|
|
23
|
+
"ios/SpeechBridge/SpeechBridge.{h,m}",
|
|
24
|
+
"ios/STT/**/*.{swift}"
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
#s.static_framework = true
|
|
28
|
+
# Add your static libraries explicitly as vendored_libraries
|
|
29
|
+
s.vendored_libraries = "ios/TTSRNBridge/libucd.a", "ios/TTSRNBridge/libphonemes.a"
|
|
30
|
+
|
|
31
|
+
s.vendored_frameworks = "ios/TTSRNBridge/DavoiceTTS.xcframework"
|
|
32
|
+
|
|
33
|
+
s.dependency "React-Core"
|
|
34
|
+
s.dependency "onnxruntime-objc", "~> 1.20.0"
|
|
35
|
+
s.preserve_paths = 'docs', 'CHANGELOG.md', 'LICENSE', 'package.json'
|
|
36
|
+
|
|
37
|
+
end
|
|
38
|
+
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//android/build.gradle
|
|
2
|
+
apply plugin: 'com.android.library'
|
|
3
|
+
apply plugin: 'org.jetbrains.kotlin.android'
|
|
4
|
+
|
|
5
|
+
android {
|
|
6
|
+
compileSdkVersion 33
|
|
7
|
+
|
|
8
|
+
defaultConfig {
|
|
9
|
+
minSdkVersion 26
|
|
10
|
+
targetSdkVersion 33
|
|
11
|
+
consumerProguardFiles 'consumer-rules.pro'
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
sourceSets {
|
|
15
|
+
main {
|
|
16
|
+
assets.srcDirs = [
|
|
17
|
+
'src/main/assets',
|
|
18
|
+
]
|
|
19
|
+
jniLibs.srcDirs = ['src/main/jniLibs'] // Add this line if needed
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
repositories {
|
|
25
|
+
google()
|
|
26
|
+
mavenCentral()
|
|
27
|
+
maven {
|
|
28
|
+
url './libs'
|
|
29
|
+
}
|
|
30
|
+
maven {
|
|
31
|
+
url "$projectDir/libs"
|
|
32
|
+
}
|
|
33
|
+
mavenLocal()
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
dependencies {
|
|
37
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.24" // <-- add
|
|
38
|
+
implementation "com.facebook.react:react-native:+"
|
|
39
|
+
api 'com.davoice:tts:1.0.0'
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Run this once to be able to run the application with BUCK
|
|
43
|
+
// puts all compile dependencies into folder libs for BUCK to use
|
|
44
|
+
task copyDownloadableDepsToLibs(type: Copy) {
|
|
45
|
+
from configurations.implementation
|
|
46
|
+
into 'libs'
|
|
47
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dd2b50d07ff256989600f071c66d4227 tts-1.0.0.aar
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f351faff177e5d8cba9faacd5bf97da0accb10b0 tts-1.0.0.aar
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
2
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
3
|
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
|
4
|
+
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
5
|
+
|
|
6
|
+
<modelVersion>4.0.0</modelVersion>
|
|
7
|
+
|
|
8
|
+
<!-- Your Maven coordinates -->
|
|
9
|
+
<groupId>com.davoice</groupId>
|
|
10
|
+
<artifactId>tts</artifactId>
|
|
11
|
+
<version>1.0.0</version>
|
|
12
|
+
<packaging>aar</packaging>
|
|
13
|
+
|
|
14
|
+
<name>DaVoice TTS</name>
|
|
15
|
+
<description>
|
|
16
|
+
Advanced text-to-speech (TTS) library by DaVoice for Android, packaged as an AAR.
|
|
17
|
+
</description>
|
|
18
|
+
<url>https://davoice.io</url>
|
|
19
|
+
|
|
20
|
+
<licenses>
|
|
21
|
+
<license>
|
|
22
|
+
<name>Proprietary License</name>
|
|
23
|
+
<url>https://davoice.io/license</url>
|
|
24
|
+
<distribution>repo</distribution>
|
|
25
|
+
</license>
|
|
26
|
+
</licenses>
|
|
27
|
+
|
|
28
|
+
<developers>
|
|
29
|
+
<developer>
|
|
30
|
+
<id>davoice</id>
|
|
31
|
+
<name>DaVoice Team</name>
|
|
32
|
+
<email>support@davoice.io</email>
|
|
33
|
+
<organization>DaVoice LTD</organization>
|
|
34
|
+
<organizationUrl>https://davoice.io</organizationUrl>
|
|
35
|
+
</developer>
|
|
36
|
+
</developers>
|
|
37
|
+
|
|
38
|
+
</project>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
751a7e1f63e63b9ec1832fa597bf4b0c tts-1.0.0.pom
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cdae716fc67e3faa885f98c97db85d5ac47751cc tts-1.0.0.pom
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
+
package="com.davoice.tts.rn">
|
|
3
|
+
|
|
4
|
+
<uses-permission android:name="android.permission.INTERNET" />
|
|
5
|
+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
|
6
|
+
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
|
|
7
|
+
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
|
8
|
+
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
|
|
9
|
+
|
|
10
|
+
<!-- Place in the app -->
|
|
11
|
+
<!-- <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"/> -->
|
|
12
|
+
|
|
13
|
+
</manifest>
|
|
14
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
package com.davoice.rn;
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.ReactPackage;
|
|
4
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
|
5
|
+
import com.facebook.react.bridge.NativeModule;
|
|
6
|
+
import com.facebook.react.uimanager.ViewManager;
|
|
7
|
+
|
|
8
|
+
import java.util.Collections;
|
|
9
|
+
import java.util.ArrayList;
|
|
10
|
+
import java.util.List;
|
|
11
|
+
|
|
12
|
+
import com.davoice.tts.rn.DaVoiceTTSBridge;
|
|
13
|
+
import com.davoice.stt.rn.STTModule;
|
|
14
|
+
|
|
15
|
+
public class DaVoicePackage implements ReactPackage {
|
|
16
|
+
|
|
17
|
+
@Override
|
|
18
|
+
public List<NativeModule> createNativeModules(ReactApplicationContext rc) {
|
|
19
|
+
List<NativeModule> modules = new ArrayList<>();
|
|
20
|
+
modules.add(new DaVoiceTTSBridge(rc)); // "DaVoiceTTSBridge"
|
|
21
|
+
modules.add(new STTModule(rc)); // "STT"
|
|
22
|
+
return modules;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@Override
|
|
26
|
+
public List<ViewManager> createViewManagers(ReactApplicationContext rc) {
|
|
27
|
+
return Collections.emptyList();
|
|
28
|
+
}
|
|
29
|
+
}
|