Skip to content

VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.

feat(mobile): complete native workflows and Electron-style Home

debpalashb3ce49936d0a
diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml
index 02c6be661..a036f3b10 100644
--- a/.github/workflows/mobile.yml
+++ b/.github/workflows/mobile.yml
@@ -97,6 +97,9 @@ jobs:
key: ios-native-${{ hashFiles('mobile/native/pins.json', 'mobile/native/ios/**', '!mobile/native/ios/build/**') }}
- name: Build native runtimes
+ env:
+ # Read-only token: avoids the anonymous GitHub API rate limit on shared runners.
+ GITHUB_TOKEN: ${{ github.token }}
run: |
brew install cmake ninja 2>/dev/null || true
bash mobile/native/ios/build.sh ios
@@ -129,6 +132,13 @@ jobs:
-scheme VoiceStudio -destination "id=$SIM_UDID" \
CODE_SIGNING_ALLOWED=NO test-without-building
+ - name: Native video export regression
+ run: |
+ xcodebuild -project mobile/ios/VoiceStudio/VoiceStudio.xcodeproj \
+ -scheme VoiceStudioNative -destination "id=$SIM_UDID" \
+ '-only-testing:VoiceStudioKitTests/phoneVideoMuxPreservesOrientationAndMarksPlayableAudio()' \
+ -parallel-testing-enabled NO CODE_SIGNING_ALLOWED=NO test
+
# Unsigned device build for maintainers to sideload onto their own iPhone
# (it is signed on install with their Apple ID; see docs/mobile.md). Not a
# release artifact.
@@ -166,7 +176,7 @@ jobs:
path: |
mobile/native/ios/build/macos
mobile/ios/.cache/inference-models
- key: ios-inference-${{ hashFiles('mobile/native/pins.json', 'mobile/native/ios/build.py', 'mobile/contract/models.json') }}
+ key: ios-inference-${{ hashFiles('mobile/native/pins.json', 'mobile/native/ios/build.py', 'mobile/native/ios/patches/**', 'mobile/contract/models.json') }}
- name: Fetch smallest models
run: python3 mobile/ios/scripts/fetch-smoke-models.py --accept-test-licences
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7550a8b28..4229bdbf6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,12 @@ metadata and the backend fallback mirror it.
- Contributor guides and the pull request template explain how to sign the CLA before opening a first pull request (#2676)
+### Fixed
+
+- Phone apps open on an Electron-style Home dashboard with shared artwork, workspace shortcuts, recent audio, saved voices and resumable dubbing projects (#2969)
+
+- Phone video dubbing uses a supported AAC bitrate and preserves playable audio, rotation and synthetic-audio metadata (#2969)
+
### CI
- Desktop request-guard self-tests stay deterministic when app requests arrive during cleanup (#2676)
diff --git a/mobile/android/README.md b/mobile/android/README.md
index 61d074a08..e2d279a2d 100644
--- a/mobile/android/README.md
+++ b/mobile/android/README.md
@@ -71,22 +71,25 @@ compact card offers Get with the total download size. Dub groups its ASR,
translation and cloning dependencies in one card; each gated model has its own
licence confirmation. The card also opens Models. Run on is a compact This phone / Computer control visible only when paired. Phone and
computer voices remain separate, with a location badge in the combined list.
-Settings opens optional Connect and Models. Model choices use product names and
+Settings opens optional Connect and Models. Resuming a download counts only missing
+bytes plus a small reserve, skipping verified completed files. Model choices use product names and
localized capabilities; licence details stay inside the acceptance sheet.
Speak has a large editor with placeholder-only copy, three compact picker chips,
-Generate, a player and compact recent rows. Dictate keeps the microphone and
+Generate, a player and compact recent rows. Switching speech models resets any
+preset speaker outside the new model's range; Generate requires a valid speaker. Dictate keeps the microphone and
copy/share controls above the tab bar while the transcript scrolls: tap
starts/stops; hold records until release. Connect keeps URL/PIN
under Enter address and the optional API key under More. Model licences open in
a sheet with complete inert terms, a rights confirmation and Accept / Decline.
Screens use short labels and icons; hints live behind one info action. Settings
uses distinct row icons without explanatory paragraphs. Pickers mark the current
-selection, use normal text colors, and show palette color swatches. Errors use
-short messages and a recovery action; the original structured error keys remain available to workers.
+selection, use normal text colors, and show palette color swatches. Errors show a short title, the localized cause and recovery step, and a recovery action.
+Workers retain structured error keys and parameters across resumes.
Connect supports CameraX/ZXing QR scanning, manual URL/PIN/API-key entry, saved
-hosts and editable labels; last-seen timestamps are retained locally. Public `/health` must carry the backend
+hosts and editable labels; a successful scan reveals the address, PIN and Connect action.
+Last-seen timestamps are retained locally. Public `/health` must carry the backend
marker and expected status/version; `/profiles` verifies consumption access.
Master keys only enter the session exchange and are never persisted. Session
and PIN ciphertext is stored using a Keystore AES-GCM key; DataStore contains
@@ -282,7 +285,8 @@ allowed, and reject low storage. A server ignoring Range restarts that file.
Redirects stay HTTPS on Hugging Face/HF CDN or mirror hosts. The dedicated
client never carries computer credentials. Incomplete files remain resumable;
Delete removes them too. Every file must match size and SHA-256 before an
-installation marker is written; files are hashed again before a native load.
+installation marker is written; native loads reuse verification while the file stamp
+(size, modification time and catalogue identity) is unchanged.
Phone files and local licence receipts live under Android's `noBackupFilesDir`;
they are app-private and excluded from cloud and device backups. Non-commercial,
@@ -351,12 +355,21 @@ not gate foreground processing. Android foreground execution limits still
apply. Atomic checkpoints retain extracted PCM, timestamped segments,
translations, exact reference text and hashes of fitted segment files. Process
restart resumes existing work; cancelled/failed jobs expose Resume and Delete.
-Changed model/catalogue identities fail closed. Native loads always recheck
-licences and model hashes; UI and workers share model leases and licence state.
-A mix is rebuilt from completed segment files on resume, preventing duplicate
-audio. Completed jobs release their source and intermediate PCM, retaining
+Changed model/catalogue identities fail closed. Native loads always recheck licences. Model SHA-256 verification is cached per file
+using size, modification time and catalogue identity; changed stamps and native failures
+invalidate it. The cache is shared by UI and workers for the process lifetime; a fresh
+process verifies files on first load. Native inference owns its lease until native
+cleanup returns, including after cancellation. UI and workers share model leases and
+licence state.
+Whole-segment reference clips reuse their segment transcript; shortened clips fall
+back to it if ASR returns blank. The chosen transcript is checkpointed before cloning.
+A mix is rebuilt from completed segment files on resume, preventing duplicate audio. Completed jobs release their source and intermediate PCM, retaining
private output/history with play (including video), share, save and delete.
+Recording auto-stops at 29 seconds to leave encoding headroom under the 30-second
+phone reference limit. Unreadable voice or dub records are skipped individually;
+installed-model state remains available.
+
Native builds, checksums and cancellation boundaries are documented in
[`../native/android/README.md`](../native/android/README.md).
@@ -374,21 +387,23 @@ export HF_HUB_CACHE="$PWD/build/hf-empty"
./gradlew assembleDebugAndroidTest
```
-The current host run passed all four Gradle tasks: 123 JVM tests, zero failures
-or skips, and zero lint errors. Debug app and instrumentation APKs build for
-arm64-v8a and x86_64; instrumentation is not executed here.
+Debug app and instrumentation APKs target arm64-v8a and x86_64. The JVM checks
+run without a device; instrumentation needs maintainer device/emulator execution.
JVM checks cover existing M1 API/security, storage, worker, picker, protocol and
Compose smoke regressions, plus generated logo/adaptive/splash resources, compact download prompts,
separate queued licence sheets, picker marks/colors/swatches, Dictate control
spacing, local catalogue/routing, licence persistence and
withdrawal, HTTP resume and restart, checksum rejection, mirror fallback,
-Wi-Fi/mobile-data policy, low storage, cancellation, deletion, synthetic WAV
+Wi-Fi/mobile-data policy, remaining-byte resume storage, verification-stamp caching,
+cancellation leases, deletion, corrupt-record isolation, QR Connect visibility,
+model-switch speaker resets, actionable error details, synthetic WAV
metadata, native cancellation control and microphone lifecycle cleanup. Phone
voice checks cover consent, reference/transcript persistence, cancellation,
rename/delete, picker routing and streaming resampling. Phone dub checks cover
multi-language output, timing/padding/mixing, provenance, checkpoint replay,
-corrupt render recovery, model/licence changes and foreground cancellation. The
+corrupt render recovery, blank-reference transcript fallback, persisted error parameters,
+model/licence changes and foreground cancellation. The
launch → consent → Settings → Connect → mock host → Speak → Play smoke preserves
the computer flow. Tests use local mock servers and an empty HF cache.
Robolectric's API 34 instrumented SDK is resolved by Gradle into app build
@@ -401,8 +416,9 @@ explicit prior review and `acceptModelLicencesForSmoke=true` for gated models.
`downloadSmokeModels=true` explicitly provisions the three smallest TTS/offline
ASR/streaming ASR selections; omit it on subsequent offline runs. It asserts
nonempty audible PCM, Whisper recognition of generated speech and a final
-Zipformer transcript. No CI workflow is changed by this Android role; the
-maintainer must wire/run it on the x86_64 emulator and physical devices.
+Zipformer transcript. The `android-inference` job in `.github/workflows/mobile.yml`
+runs this smoke on an x86_64 emulator with explicit test-model provisioning;
+physical-device validation remains separate.
`cloneInferenceSmoke=true` adds real WAV decoding, Whisper reference creation
and OmniVoice cloning, including persisted rename/delete. `dubInferenceSmoke=true`
@@ -413,8 +429,26 @@ the device's declared model RAM before loading. The unconditional
generates its own AVC fixture, encodes/muxes synthetic audio, and checks tracks,
orientation, duration and decoding. No fixture/model binaries are committed.
-This environment builds instrumentation only. Native loading on ART, real model
-inference/quality, audible playback, codec support, microphone permissions,
-large-font/TalkBack rendering, device RAM and background/notification behavior
-require maintainer device/emulator verification. No adb or device commands are
-used here. No CI workflow is modified by the Android implementation.
+Local validation on 2026-10-18 builds the app and instrumentation APKs, passes all 136 JVM
+tests and lint, and runs the Android 14 emulator checks: app launch, localization
+and error handling on ART, loading all three native runtimes together, and AVC/AAC
+muxing with orientation and synthetic-audio metadata. An explicit full-model run
+also passes all eight instrumentation tests with zero skips: Kitten speech,
+Whisper/Zipformer recognition, persisted reference voices and OmniVoice cloning,
+and a complete Whisper → French translation → OmniVoice audio dub. The run takes
+about 20 minutes on the local ARM64 emulator, including model provisioning.
+Inference quality, audible playback, microphone permissions,
+large-font/TalkBack rendering, physical-device RAM and background/notification
+behavior require their separate model/device checks.
+
+## Electron-style mobile Home
+
+Home is the first workspace after consent, using Electron's bundled signal-field
+artwork, shared palette roles, Inter and card hierarchy. Speak, cloning, dubbing,
+dictation, models and computer pairing have working shortcut cards. Generated
+audio, saved voices and recent dubbing projects come from the actual phone
+libraries, with paired-computer entries alongside them. Audio opens its player,
+saved phone voices select the reference in Speak, and projects open their
+outputs and resume controls. Empty states are localized and downloads remain
+explicit. Home replaces Speak in the five-item navigation; Speak opens from Home.
+Desktop-only workspaces are not advertised as available mobile features.
diff --git a/mobile/android/app/build.gradle.kts b/mobile/android/app/build.gradle.kts
index 067c826d4..66187c2a2 100644
--- a/mobile/android/app/build.gradle.kts
+++ b/mobile/android/app/build.gradle.kts
@@ -33,6 +33,7 @@ val bundleCatalogs by tasks.registering {
val catalogs = repository.resolve("electron/src/renderer/src/i18n/locales")
val contracts = repository.resolve("mobile/contract")
inputs.dir(catalogs)
+ inputs.file(repository.resolve("electron/public/signal-field.webp"))
inputs.file(repository.resolve("electron/src/shared/languages.json"))
inputs.file(repository.resolve("LICENSE"))
inputs.files(fileTree(contracts) { include("strings*.en.json", "tokens.json", "openapi.json", "models.json") })
@@ -42,6 +43,7 @@ val bundleCatalogs by tasks.registering {
val assets = layout.buildDirectory.dir("generated/catalogs").get().asFile
assets.deleteRecursively()
assets.mkdirs()
+ repository.resolve("electron/public/signal-field.webp").copyTo(assets.resolve("signal-field.webp"), overwrite=true)
repository.resolve("electron/src/shared/languages.json").copyTo(assets.resolve("languages.json"), overwrite=true)
val out = assets.resolve("locales").apply { mkdirs() }
assets.resolve("licenses").mkdirs()
@@ -104,11 +106,13 @@ tasks.withType<Test>().configureEach {
}
val buildNativeRuntimes by tasks.registering(Exec::class) {
+ dependsOn(":core:local:fetchRuntimes")
val nativeRoot = rootDir.resolve("../native/android")
inputs.files(fileTree(nativeRoot) { include("*.cpp", "*.h", "*.json", "*.py", "*.sh", "CMakeLists.txt") }, nativeRoot.resolve("../pins.json"))
+ inputs.files(fileTree("src/main/assets/licenses") { include("native-*") })
outputs.dir(nativeRoot.resolve("build/jniLibs"))
outputs.dir(nativeRoot.resolve("build/assets"))
- commandLine("bash", nativeRoot.resolve("build.sh"))
+ commandLine("bash", nativeRoot.resolve("build.sh"), "--skip-fetch")
}
tasks.named("preBuild") { dependsOn(buildNativeRuntimes) }
diff --git a/mobile/android/app/src/main/assets/licenses/NOTICE.txt b/mobile/android/app/src/main/assets/licenses/NOTICE.txt
index 6b3dd4074..765faabe2 100644
--- a/mobile/android/app/src/main/assets/licenses/NOTICE.txt
+++ b/mobile/android/app/src/main/assets/licenses/NOTICE.txt
@@ -14,11 +14,15 @@ ZXing: https://github.com/zxing/zxing
Apache License 2.0: included in Apache-2.0.txt.
No analytics, crash reporting or remote notification dependencies are present.
-sherpa-onnx 1.13.8: Copyright sherpa-onnx authors, Apache License 2.0.
-https://github.com/k2-fsa/sherpa-onnx
-The pinned AAR includes ONNX Runtime, Copyright Microsoft Corporation, MIT.
-ONNX Runtime licence is included in ONNX-Runtime-MIT.txt.
-OmniVoice and its GGML, and llama.cpp/GGML: MIT; their original notices
-are packaged as omnivoice-MIT.txt, omnivoice-ggml-MIT.txt and llama-MIT.txt.
-Native runtime versions and checksums: mobile/native/pins.json.
+Native runtime notices (same component set as the iOS app):
+sherpa-onnx 1.13.8 (Apache-2.0), ONNX Runtime (MIT), eSpeak NG (GPL-3.0),
+piper-phonemize (MIT), kaldi-native-fbank (Apache-2.0), KissFFT (BSD-3-Clause),
+kaldi-decoder, kaldifst and OpenFst (Apache-2.0), simple-sentencepiece
+(Apache-2.0), nlohmann/json (MIT), hclust-cpp (BSD-2-Clause), Eigen (MPL-2.0 with bundled BSD/Apache notices),
+omnivoice.cpp and its GGML (MIT), llama.cpp and its GGML (MIT).
+Their complete upstream notices are included in native-*.txt. Original nested
+component notices are retained, including Unicode data and bundled headers.
+Pinned source URLs/commits and eSpeak NG corresponding source (including build
+scripts) are listed in native-Corresponding-source.txt and native-sources.json.
+Runtime versions and AAR checksum: mobile/native/pins.json.
Model licences and attribution are displayed separately in Models.
diff --git a/mobile/android/app/src/main/assets/licenses/native-Corresponding-source.txt b/mobile/android/app/src/main/assets/licenses/native-Corresponding-source.txt
new file mode 100644
index 000000000..ab7322c7c
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-Corresponding-source.txt
@@ -0,0 +1,26 @@
+VoiceStudio native runtime corresponding sources
+
+eSpeak NG is GPL-3.0. Its complete pinned upstream source archive,
+including its build scripts, is listed below. The pinned sherpa-onnx
+source and VoiceStudio mobile/native/android/build.sh, fetch.py and CMakeLists.txt contain
+the build configuration used to combine these dependencies.
+VoiceStudio source: https://github.com/debpalash/VoiceStudio
+Runtime pins: mobile/native/pins.json
+
+sherpa-onnx: https://github.com/k2-fsa/sherpa-onnx/tree/11afbd009a7f8c08f4bcf2fc1b265d0df4670fbf
+omnivoice.cpp: https://github.com/ServeurpersoCom/omnivoice.cpp/tree/886fc079838ca7400cb2b42b36e2a65aa1daabe8
+omnivoice-ggml: https://github.com/ServeurpersoCom/ggml/tree/f3bc6505c4e2ede83a193e0fb4695938ff3804fd
+llama.cpp: https://github.com/ggml-org/llama.cpp/tree/797de63b2fa7396dcc8caca76834c699ac84e1c3
+llama-ggml: https://github.com/ggml-org/llama.cpp/tree/797de63b2fa7396dcc8caca76834c699ac84e1c3/ggml
+espeak-ng-for-piper: https://github.com/csukuangfj/espeak-ng/archive/ed530aa113046142eb5115cf2fc9157854d0ffe1.zip
+piper-phonemize: https://github.com/csukuangfj/piper-phonemize/archive/f3ff95afc03640bc1399e113e83361192a2fafb4.zip
+kaldi-native-fbank: https://github.com/csukuangfj/kaldi-native-fbank/archive/refs/tags/v1.22.3.tar.gz
+kissfft: https://github.com/mborgerding/kissfft/archive/febd4caeed32e33ad8b2e0bb5ea77542c40f18ec.zip
+kaldi-decoder: https://github.com/k2-fsa/kaldi-decoder/archive/refs/tags/v0.3.0.tar.gz
+eigen: https://gitlab.com/libeigen/eigen/-/archive/5.0.1/eigen-5.0.1.tar.gz
+kaldifst: https://github.com/k2-fsa/kaldifst/archive/refs/tags/v1.8.0.tar.gz
+openfst: https://github.com/csukuangfj/openfst/archive/refs/tags/v1.8.5-2026-07-09.tar.gz
+simple-sentencepiece: https://github.com/pkufool/simple-sentencepiece/archive/refs/tags/v0.7.tar.gz
+json: https://github.com/nlohmann/json/archive/refs/tags/v3.12.0.tar.gz
+hclust-cpp: https://github.com/csukuangfj/hclust-cpp/archive/refs/tags/2026-02-25.tar.gz
+onnxruntime: https://github.com/microsoft/onnxruntime/tree/v1.28.2
diff --git a/mobile/android/app/src/main/assets/licenses/native-eigen.txt b/mobile/android/app/src/main/assets/licenses/native-eigen.txt
new file mode 100644
index 000000000..d2a7481b3
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-eigen.txt
@@ -0,0 +1,1399 @@
+eigen
+Source: https://gitlab.com/libeigen/eigen/-/archive/5.0.1/eigen-5.0.1.tar.gz
+
+eigen-5.0.1/COPYING.APACHE
+
+/*
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+eigen-5.0.1/COPYING.BSD
+
+/*
+ Copyright (c) 2011, Intel Corporation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ * Neither the name of Intel Corporation nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+eigen-5.0.1/COPYING.MINPACK
+
+Minpack Copyright Notice (1999) University of Chicago. All rights reserved
+
+Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the
+following conditions are met:
+
+1. Redistributions of source code must retain the above
+copyright notice, this list of conditions and the following
+disclaimer.
+
+2. Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following
+disclaimer in the documentation and/or other materials
+provided with the distribution.
+
+3. The end-user documentation included with the
+redistribution, if any, must include the following
+acknowledgment:
+
+ "This product includes software developed by the
+ University of Chicago, as Operator of Argonne National
+ Laboratory.
+
+Alternately, this acknowledgment may appear in the software
+itself, if and wherever such third-party acknowledgments
+normally appear.
+
+4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS"
+WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE
+UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND
+THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE
+OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY
+OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR
+USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF
+THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4)
+DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION
+UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL
+BE CORRECTED.
+
+5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT
+HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF
+ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT,
+INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF
+ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF
+PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER
+SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT
+(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE,
+EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE
+POSSIBILITY OF SUCH LOSS OR DAMAGES.
+
+
+eigen-5.0.1/COPYING.MPL2
+
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at https://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
+
+
+eigen-5.0.1/COPYING.README
+
+Eigen is primarily MPL2 licensed. See COPYING.MPL2 and these links:
+ http://www.mozilla.org/MPL/2.0/
+ http://www.mozilla.org/MPL/2.0/FAQ.html
+
+Some files contain third-party code under BSD or other MPL2-compatible licenses,
+whence the other COPYING.* files here.
+
+eigen-5.0.1/LICENSE
+
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
+
+
+eigen-5.0.1/bench/btl/COPYING
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/mobile/android/app/src/main/assets/licenses/native-espeak-ng-for-piper.txt b/mobile/android/app/src/main/assets/licenses/native-espeak-ng-for-piper.txt
new file mode 100644
index 000000000..46cb494b7
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-espeak-ng-for-piper.txt
@@ -0,0 +1,1705 @@
+espeak-ng-for-piper
+Source: https://github.com/csukuangfj/espeak-ng/archive/ed530aa113046142eb5115cf2fc9157854d0ffe1.zip
+
+espeak-ng-ed530aa113046142eb5115cf2fc9157854d0ffe1/COPYING
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+
+
+espeak-ng-ed530aa113046142eb5115cf2fc9157854d0ffe1/COPYING.APACHE
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+espeak-ng-ed530aa113046142eb5115cf2fc9157854d0ffe1/COPYING.BSD2
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+
+espeak-ng-ed530aa113046142eb5115cf2fc9157854d0ffe1/COPYING.UCD
+
+Unicode Data Files include all data files under the directories
+http://www.unicode.org/Public/, http://www.unicode.org/reports/,
+http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
+http://www.unicode.org/utility/trac/browser/.
+
+Unicode Data Files do not include PDF online code charts under the
+directory http://www.unicode.org/Public/.
+
+Software includes any source code published in the Unicode Standard
+or under the directories
+http://www.unicode.org/Public/, http://www.unicode.org/reports/,
+http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
+http://www.unicode.org/utility/trac/browser/.
+
+NOTICE TO USER: Carefully read the following legal agreement.
+BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
+DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
+YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
+TERMS AND CONDITIONS OF THIS AGREEMENT.
+IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
+THE DATA FILES OR SOFTWARE.
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright © 1991-2018 Unicode, Inc. All rights reserved.
+Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Unicode data files and any associated documentation
+(the "Data Files") or Unicode software and any associated documentation
+(the "Software") to deal in the Data Files or Software
+without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, and/or sell copies of
+the Data Files or Software, and to permit persons to whom the Data Files
+or Software are furnished to do so, provided that either
+(a) this copyright and permission notice appear with all copies
+of the Data Files or Software, or
+(b) this copyright and permission notice appear in associated
+Documentation.
+
+THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in these Data Files or Software without prior
+written authorization of the copyright holder.
+
+
+espeak-ng-ed530aa113046142eb5115cf2fc9157854d0ffe1/src/ucd-tools/COPYING
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+
+
+espeak-ng-ed530aa113046142eb5115cf2fc9157854d0ffe1/src/ucd-tools/COPYING.UCD
+
+Unicode Data Files include all data files under the directories
+http://www.unicode.org/Public/, http://www.unicode.org/reports/,
+http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
+http://www.unicode.org/utility/trac/browser/.
+
+Unicode Data Files do not include PDF online code charts under the
+directory http://www.unicode.org/Public/.
+
+Software includes any source code published in the Unicode Standard
+or under the directories
+http://www.unicode.org/Public/, http://www.unicode.org/reports/,
+http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
+http://www.unicode.org/utility/trac/browser/.
+
+NOTICE TO USER: Carefully read the following legal agreement.
+BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
+DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
+YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
+TERMS AND CONDITIONS OF THIS AGREEMENT.
+IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
+THE DATA FILES OR SOFTWARE.
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright © 1991-2018 Unicode, Inc. All rights reserved.
+Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Unicode data files and any associated documentation
+(the "Data Files") or Unicode software and any associated documentation
+(the "Software") to deal in the Data Files or Software
+without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, and/or sell copies of
+the Data Files or Software, and to permit persons to whom the Data Files
+or Software are furnished to do so, provided that either
+(a) this copyright and permission notice appear with all copies
+of the Data Files or Software, or
+(b) this copyright and permission notice appear in associated
+Documentation.
+
+THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in these Data Files or Software without prior
+written authorization of the copyright holder.
diff --git a/mobile/android/app/src/main/assets/licenses/native-hclust-cpp.txt b/mobile/android/app/src/main/assets/licenses/native-hclust-cpp.txt
new file mode 100644
index 000000000..5acc5ad1c
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-hclust-cpp.txt
@@ -0,0 +1,18 @@
+hclust-cpp
+Source: https://github.com/csukuangfj/hclust-cpp/archive/refs/tags/2026-02-25.tar.gz
+
+hclust-cpp-2026-02-25/LICENSE
+
+Copyright:
+ * fastcluster_dm.cpp & fastcluster_R_dm.cpp:
+ © 2011 Daniel Müllner <http://danifold.net>
+ * fastcluster.(h|cpp) & demo.cpp & plotresult.r:
+ © 2018 Christoph Dalitz <http://www.hsnr.de/ipattern/>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/mobile/android/app/src/main/assets/licenses/native-json.txt b/mobile/android/app/src/main/assets/licenses/native-json.txt
new file mode 100644
index 000000000..29594e38f
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-json.txt
@@ -0,0 +1,51 @@
+json
+Source: https://github.com/nlohmann/json/archive/refs/tags/v3.12.0.tar.gz
+
+json-3.12.0/LICENSE.MIT
+
+MIT License
+
+Copyright (c) 2013-2025 Niels Lohmann
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+json-3.12.0/docs/mkdocs/docs/home/license.md
+
+# License
+
+<img align="right" src="https://149753425.v2.pressablecdn.com/wp-content/uploads/2009/06/OSIApproved_100X125.png">
+
+The class is licensed under the [MIT License](https://opensource.org/licenses/MIT):
+
+Copyright &copy; 2013-2025 [Niels Lohmann](https://nlohmann.me)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+* * *
+
+The class contains the UTF-8 Decoder from Bjoern Hoehrmann which is licensed under the [MIT License](https://opensource.org/licenses/MIT) (see above). Copyright &copy; 2008-2009 [Björn Hoehrmann](http://bjoern.hoehrmann.de/) <[email protected]>
+
+The class contains a slightly modified version of the Grisu2 algorithm from Florian Loitsch which is licensed under the [MIT License](https://opensource.org/licenses/MIT) (see above). Copyright &copy; 2009 [Florian Loitsch](https://florian.loitsch.com/)
+
+The class contains a copy of [Hedley](https://nemequ.github.io/hedley/) from Evan Nemerson which is licensed as [CC0-1.0](https://creativecommons.org/publicdomain/zero/1.0/).
diff --git a/mobile/android/app/src/main/assets/licenses/native-kaldi-decoder.txt b/mobile/android/app/src/main/assets/licenses/native-kaldi-decoder.txt
new file mode 100644
index 000000000..d73cf645d
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-kaldi-decoder.txt
@@ -0,0 +1,207 @@
+kaldi-decoder
+Source: https://github.com/k2-fsa/kaldi-decoder/archive/refs/tags/v0.3.0.tar.gz
+
+kaldi-decoder-0.3.0/LICENSE
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/mobile/android/app/src/main/assets/licenses/native-kaldi-native-fbank.txt b/mobile/android/app/src/main/assets/licenses/native-kaldi-native-fbank.txt
new file mode 100644
index 000000000..410b373d8
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-kaldi-native-fbank.txt
@@ -0,0 +1,207 @@
+kaldi-native-fbank
+Source: https://github.com/csukuangfj/kaldi-native-fbank/archive/refs/tags/v1.22.3.tar.gz
+
+kaldi-native-fbank-1.22.3/LICENSE
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/mobile/android/app/src/main/assets/licenses/native-kaldifst.txt b/mobile/android/app/src/main/assets/licenses/native-kaldifst.txt
new file mode 100644
index 000000000..a157df562
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-kaldifst.txt
@@ -0,0 +1,216 @@
+kaldifst
+Source: https://github.com/k2-fsa/kaldifst/archive/refs/tags/v1.8.0.tar.gz
+
+kaldifst-1.8.0/LICENSE
+
+
+ Legal Notices
+
+ NOTE (this is not from the Apache License): The copyright model is that
+ authors (or their employers, if noted in individual files) own their
+ individual contributions. The authors' contributions can be discerned
+ from the git history.
+
+ -------------------------------------------------------------------------
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/mobile/android/app/src/main/assets/licenses/native-kissfft.txt b/mobile/android/app/src/main/assets/licenses/native-kissfft.txt
new file mode 100644
index 000000000..9092a97fa
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-kissfft.txt
@@ -0,0 +1,55 @@
+kissfft
+Source: https://github.com/mborgerding/kissfft/archive/febd4caeed32e33ad8b2e0bb5ea77542c40f18ec.zip
+
+kissfft-febd4caeed32e33ad8b2e0bb5ea77542c40f18ec/COPYING
+
+Copyright (c) 2003-2010 Mark Borgerding . All rights reserved.
+
+KISS FFT is provided under:
+
+ SPDX-License-Identifier: BSD-3-Clause
+
+Being under the terms of the BSD 3-clause "New" or "Revised" License,
+according with:
+
+ LICENSES/BSD-3-Clause
+
+
+
+kissfft-febd4caeed32e33ad8b2e0bb5ea77542c40f18ec/LICENSES/BSD-3-Clause
+
+Valid-License-Identifier: BSD-3-Clause
+SPDX-URL: https://spdx.org/licenses/BSD-3-Clause.html
+Usage-Guide:
+ To use the BSD 3-clause "New" or "Revised" License put the following SPDX
+ tag/value pair into a comment according to the placement guidelines in
+ the licensing rules documentation:
+ SPDX-License-Identifier: BSD-3-Clause
+License-Text:
+
+Copyright (c) <year> <owner> . All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its contributors
+may be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/mobile/android/app/src/main/assets/licenses/native-llama-ggml.txt b/mobile/android/app/src/main/assets/licenses/native-llama-ggml.txt
new file mode 100644
index 000000000..f029ac646
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-llama-ggml.txt
@@ -0,0 +1,26 @@
+llama-ggml
+Source: https://github.com/ggml-org/llama.cpp/tree/797de63b2fa7396dcc8caca76834c699ac84e1c3/ggml
+
+LICENSE
+
+MIT License
+
+Copyright (c) 2023-2026 The ggml authors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/mobile/android/app/src/main/assets/licenses/native-llama.cpp.txt b/mobile/android/app/src/main/assets/licenses/native-llama.cpp.txt
new file mode 100644
index 000000000..fa3aeb846
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-llama.cpp.txt
@@ -0,0 +1,26 @@
+llama.cpp
+Source: https://github.com/ggml-org/llama.cpp/tree/797de63b2fa7396dcc8caca76834c699ac84e1c3
+
+LICENSE
+
+MIT License
+
+Copyright (c) 2023-2026 The ggml authors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/mobile/android/app/src/main/assets/licenses/native-omnivoice-ggml.txt b/mobile/android/app/src/main/assets/licenses/native-omnivoice-ggml.txt
new file mode 100644
index 000000000..f5f66a7d9
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-omnivoice-ggml.txt
@@ -0,0 +1,26 @@
+omnivoice-ggml
+Source: https://github.com/ServeurpersoCom/ggml/tree/f3bc6505c4e2ede83a193e0fb4695938ff3804fd
+
+LICENSE
+
+MIT License
+
+Copyright (c) 2023-2026 The ggml authors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/mobile/android/app/src/main/assets/licenses/native-omnivoice.cpp.txt b/mobile/android/app/src/main/assets/licenses/native-omnivoice.cpp.txt
new file mode 100644
index 000000000..2c0ab2398
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-omnivoice.cpp.txt
@@ -0,0 +1,26 @@
+omnivoice.cpp
+Source: https://github.com/ServeurpersoCom/omnivoice.cpp/tree/886fc079838ca7400cb2b42b36e2a65aa1daabe8
+
+LICENSE
+
+MIT License
+
+Copyright (c) 2023-2026 The omnivoice.cpp authors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/mobile/android/app/src/main/assets/licenses/native-onnxruntime.txt b/mobile/android/app/src/main/assets/licenses/native-onnxruntime.txt
new file mode 100644
index 000000000..f9a7481c2
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-onnxruntime.txt
@@ -0,0 +1,26 @@
+onnxruntime
+Source: https://github.com/microsoft/onnxruntime/tree/v1.28.2
+
+LICENSE
+
+MIT License
+
+Copyright (c) Microsoft Corporation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/mobile/android/app/src/main/assets/licenses/native-openfst.txt b/mobile/android/app/src/main/assets/licenses/native-openfst.txt
new file mode 100644
index 000000000..e8282b027
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-openfst.txt
@@ -0,0 +1,18 @@
+openfst
+Source: https://github.com/csukuangfj/openfst/archive/refs/tags/v1.8.5-2026-07-09.tar.gz
+
+openfst-1.8.5-2026-07-09/COPYING
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use these files except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Copyright 2005-2026 Google LLC.
diff --git a/mobile/android/app/src/main/assets/licenses/native-piper-phonemize.txt b/mobile/android/app/src/main/assets/licenses/native-piper-phonemize.txt
new file mode 100644
index 000000000..3c9727f99
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-piper-phonemize.txt
@@ -0,0 +1,71 @@
+piper-phonemize
+Source: https://github.com/csukuangfj/piper-phonemize/archive/f3ff95afc03640bc1399e113e83361192a2fafb4.zip
+
+piper-phonemize-f3ff95afc03640bc1399e113e83361192a2fafb4/LICENSE.md
+
+MIT License
+
+Copyright (c) 2023 Michael Hansen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+piper-phonemize-f3ff95afc03640bc1399e113e83361192a2fafb4/licenses/uni-algo/LICENSE.md
+
+Public Domain License
+
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
+software, either in source code form or as a compiled binary, for any purpose,
+commercial or non-commercial, and by any means.
+
+In jurisdictions that recognize copyright laws, the author or authors of this
+software dedicate any and all copyright interest in the software to the public
+domain. We make this dedication for the benefit of the public at large and to
+the detriment of our heirs and successors. We intend this dedication to be an
+overt act of relinquishment in perpetuity of all present and future rights to
+this software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/mobile/android/app/src/main/assets/licenses/native-sherpa-onnx.txt b/mobile/android/app/src/main/assets/licenses/native-sherpa-onnx.txt
new file mode 100644
index 000000000..dca2831b8
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-sherpa-onnx.txt
@@ -0,0 +1,207 @@
+sherpa-onnx
+Source: https://github.com/k2-fsa/sherpa-onnx/tree/11afbd009a7f8c08f4bcf2fc1b265d0df4670fbf
+
+LICENSE
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/mobile/android/app/src/main/assets/licenses/native-simple-sentencepiece.txt b/mobile/android/app/src/main/assets/licenses/native-simple-sentencepiece.txt
new file mode 100644
index 000000000..6df0d3b58
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-simple-sentencepiece.txt
@@ -0,0 +1,206 @@
+simple-sentencepiece
+Source: https://github.com/pkufool/simple-sentencepiece/archive/refs/tags/v0.7.tar.gz
+
+simple-sentencepiece-0.7/LICENSE
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/mobile/android/app/src/main/assets/licenses/native-sources.json b/mobile/android/app/src/main/assets/licenses/native-sources.json
new file mode 100644
index 000000000..8eff82fab
--- /dev/null
+++ b/mobile/android/app/src/main/assets/licenses/native-sources.json
@@ -0,0 +1,104 @@
+[
+ {
+ "name": "sherpa-onnx",
+ "source": "https://github.com/k2-fsa/sherpa-onnx/tree/11afbd009a7f8c08f4bcf2fc1b265d0df4670fbf",
+ "source_sha256": "0a8db6c55dd318f4a688faba85f7760b99a6c92e8ef8864479d418531bee1ac2",
+ "notice_sha256": "d4fab8a41f5bb1f7f0df1e8f38bb05da11d6a04368cb308914f5036fb60ba43e"
+ },
+ {
+ "name": "omnivoice.cpp",
+ "source": "https://github.com/ServeurpersoCom/omnivoice.cpp/tree/886fc079838ca7400cb2b42b36e2a65aa1daabe8",
+ "source_sha256": "db7898b061692c2c8a83a43bf9af64ac4419b14a8bc44584aae497fc40cbced5",
+ "notice_sha256": "39170a56e1de354d1e60cba242855bee8b81812ec1520bc0823ffeda4df9d440"
+ },
+ {
+ "name": "omnivoice-ggml",
+ "source": "https://github.com/ServeurpersoCom/ggml/tree/f3bc6505c4e2ede83a193e0fb4695938ff3804fd",
+ "source_sha256": "git-tree-verified",
+ "notice_sha256": "0fa38f8cd0f5acd4a05a6dbe137286983bf57e02ef71cff47fba9e5b3a44362f"
+ },
+ {
+ "name": "llama.cpp",
+ "source": "https://github.com/ggml-org/llama.cpp/tree/797de63b2fa7396dcc8caca76834c699ac84e1c3",
+ "source_sha256": "9bd5be5bc2ab0e0f5146bc6fbdd3a4a834383aaffa105faeeada119e83d51f3e",
+ "notice_sha256": "12ef087d9481007aaa1c8eb2a282e399b9657d23fa00bbc18d88790dbe55afd9"
+ },
+ {
+ "name": "llama-ggml",
+ "source": "https://github.com/ggml-org/llama.cpp/tree/797de63b2fa7396dcc8caca76834c699ac84e1c3/ggml",
+ "source_sha256": "git-tree-verified",
+ "notice_sha256": "16930b4b113376b6a814a0217c580dabda9a461b9fd0ad86c3cc7ecaa6e4b7f8"
+ },
+ {
+ "name": "espeak-ng-for-piper",
+ "source": "https://github.com/csukuangfj/espeak-ng/archive/ed530aa113046142eb5115cf2fc9157854d0ffe1.zip",
+ "source_sha256": "e4e262cbe34f7fe21f91f1ba3397f2728e1f30eafbae7853f2b753a9ed13f0dd",
+ "notice_sha256": "d87e45ed43020f3a0846427e033d1db8751fb2962740ef40ac5d77c3f4630564"
+ },
+ {
+ "name": "piper-phonemize",
+ "source": "https://github.com/csukuangfj/piper-phonemize/archive/f3ff95afc03640bc1399e113e83361192a2fafb4.zip",
+ "source_sha256": "d9cca4e2bdc7d6dd8dffb96a4668283dbd3f77a9c194a3e530c1e8eba9406a5d",
+ "notice_sha256": "4ae3a823befa973a314c9efe7b02933f74eeae2890d6cec735d5594e62320665"
+ },
+ {
+ "name": "kaldi-native-fbank",
+ "source": "https://github.com/csukuangfj/kaldi-native-fbank/archive/refs/tags/v1.22.3.tar.gz",
+ "source_sha256": "9176cc66fc7ce1edf85cf355b06e320c57db6297df74277f575183468893cf61",
+ "notice_sha256": "57d8bae7d6caa796f0adb4eeec037d8828cc9c1b1f2e155e05c5fd383dd181c2"
+ },
+ {
+ "name": "kissfft",
+ "source": "https://github.com/mborgerding/kissfft/archive/febd4caeed32e33ad8b2e0bb5ea77542c40f18ec.zip",
+ "source_sha256": "497103e664168ebe39580b757adbe616f6cf85a16572af581ca7bc42d0ab13fd",
+ "notice_sha256": "2e533500e0eeb6a8fa2b2086d1dc8671ef74a50c1efa24bff311f010a2800562"
+ },
+ {
+ "name": "kaldi-decoder",
+ "source": "https://github.com/k2-fsa/kaldi-decoder/archive/refs/tags/v0.3.0.tar.gz",
+ "source_sha256": "b9f34cfb4fd3b1344100eead79ef4d37aa15962274b9e3056de345021f76a1b0",
+ "notice_sha256": "5dcb6878e118ccc24a443b5ce8faab1e45b9373e9a24fd4b245769c555b27bd7"
+ },
+ {
+ "name": "kaldifst",
+ "source": "https://github.com/k2-fsa/kaldifst/archive/refs/tags/v1.8.0.tar.gz",
+ "source_sha256": "3f247b7e5a2409071202f5e2bc6200060f66728c0a3443c03923ad2723e040b3",
+ "notice_sha256": "7e09a71204d285b5333cac521cfdd6cfcc1fe5779c5b8afeb915b8acba4e7cf6"
+ },
+ {
+ "name": "openfst",
+ "source": "https://github.com/csukuangfj/openfst/archive/refs/tags/v1.8.5-2026-07-09.tar.gz",
+ "source_sha256": "2ff712a32952fcb01d351121a6bc8ccf4fdc6b2aa06ce8df2b3095dedd518c0e",
+ "notice_sha256": "16ba8592a6b01be206a2d6d9fff24308b29536f82139ca371a79e32c50a180db"
+ },
+ {
+ "name": "simple-sentencepiece",
+ "source": "https://github.com/pkufool/simple-sentencepiece/archive/refs/tags/v0.7.tar.gz",
+ "source_sha256": "1748a822060a35baa9f6609f84efc8eb54dc0e74b9ece3d82367b7119fdc75af",
+ "notice_sha256": "42a99318e12c88881e719963f524a2a102b9b65b9fba7366b10d7aad7bbfac66"
+ },
+ {
+ "name": "json",
+ "source": "https://github.com/nlohmann/json/archive/refs/tags/v3.12.0.tar.gz",
+ "source_sha256": "4b92eb0c06d10683f7447ce9406cb97cd4b453be18d7279320f7b2f025c10187",
+ "notice_sha256": "261714a3aed6a9fb231b1f8f535134cde3810c6408911f0911511c15da1ef506"
+ },
+ {
+ "name": "hclust-cpp",
+ "source": "https://github.com/csukuangfj/hclust-cpp/archive/refs/tags/2026-02-25.tar.gz",
+ "source_sha256": "8f14e024c709d73afb40ae69cb22de4b73dba67cbce40f2e518813da8139ab56",
+ "notice_sha256": "5a32b0e8039f46caa5244c0684c2f024a5182214ae020f132703083ade10241a"
+ },
+ {
+ "name": "onnxruntime",
+ "source": "https://github.com/microsoft/onnxruntime/tree/v1.28.2",
+ "source_sha256": "2f07c72751aed99790b8a4869cf2311df85a860b22ded05fa22803587a48922c",
+ "notice_sha256": "41c9bfd924df1ba7f79735358c96c35123ec899528f2584c0449699c9348b7de"
+ },
+ {
+ "name": "eigen",
+ "source": "https://gitlab.com/libeigen/eigen/-/archive/5.0.1/eigen-5.0.1.tar.gz",
+ "source_sha256": "e9c326dc8c05cd1e044c71f30f1b2e34a6161a3b6ecf445d56b53ff1669e3dec",
+ "notice_sha256": "363070b197c621158ebdc39bd94aa23fc183f505a37c3fe38a78dbad234c0c5a"
+ }
+]
diff --git a/mobile/android/app/src/main/kotlin/com/voicestudio/mobile/MainActivity.kt b/mobile/android/app/src/main/kotlin/com/voicestudio/mobile/MainActivity.kt
index f882d92ce..501026b5f 100644
--- a/mobile/android/app/src/main/kotlin/com/voicestudio/mobile/MainActivity.kt
+++ b/mobile/android/app/src/main/kotlin/com/voicestudio/mobile/MainActivity.kt
@@ -65,18 +65,18 @@ class MainActivity:ComponentActivity() {
CompositionLocalProvider(LocalL10n provides l,LocalLayoutDirection provides direction) {
VoiceStudioTheme(ThemePreferences(prefs.mode,prefs.lightPalette,prefs.darkPalette)) {
key(state.connectionId) {
- val initialRoute=remember {if(state.error?.key=="mobile.connect.error_session_expired") "connect" else "speak"}
+ val initialRoute=remember {if(state.error?.key=="mobile.connect.error_session_expired") "connect" else "home"}
val nav=rememberNavController()
val back by nav.currentBackStackEntryAsState()
- val route=back?.destination?.route ?: "speak"
+ val route=back?.destination?.route ?: "home"
val dismissKeyboard=rememberKeyboardDismiss()
Scaffold(containerColor=role("canvas"),bottomBar={
NavigationBar(containerColor=role("chrome"),contentColor=role("toolbarForeground")) {
- val tabs=listOf("speak","voices","dub","dictate","settings")
+ val tabs=listOf("home","voices","dub","dictate","settings")
tabs.forEach {tab ->
- val label=if(tab=="connect") l.t("mobile.tabs.connect") else l.t("mobile.tabs.$tab")
- NavigationBarItem(selected=route==tab,onClick={dismissKeyboard();nav.navigate(tab) {popUpTo(nav.graph.startDestinationId) {saveState=true};launchSingleTop=true;restoreState=true}},
- icon={Icon(when(tab) {"speak" -> Icons.Default.PlayArrow;"voices" -> Icons.Default.Person;"dub" -> Icons.AutoMirrored.Filled.List;"dictate" -> Icons.Default.Edit;"connect" -> Icons.Default.Add;else -> Icons.Default.Settings},contentDescription=label)},
+ val label=if(tab=="home") l.t("nav.home") else if(tab=="connect") l.t("mobile.tabs.connect") else l.t("mobile.tabs.$tab")
+ NavigationBarItem(selected=route==tab || (tab=="home" && (route=="speak" || route.startsWith("voice/") || route.startsWith("host-voice/") || route.startsWith("project"))),onClick={dismissKeyboard();nav.navigate(tab) {popUpTo(nav.graph.startDestinationId) {saveState=true};launchSingleTop=true;restoreState=tab!="home"}},
+ icon={Icon(when(tab) {"home" -> Icons.Default.Home;"speak" -> Icons.Default.PlayArrow;"voices" -> Icons.Default.Person;"dub" -> Icons.AutoMirrored.Filled.List;"dictate" -> Icons.Default.Edit;"connect" -> Icons.Default.Add;else -> Icons.Default.Settings},contentDescription=label)},
label=if(LocalDensity.current.fontScale<=1.5f) {{Text(label)}} else null,
colors=NavigationBarItemDefaults.colors(indicatorColor=role("messageSurface"),selectedIconColor=role("messageAction"),selectedTextColor=role("toolbarForeground"),unselectedIconColor=role("textMuted"),unselectedTextColor=role("textMuted")))
}
@@ -87,7 +87,7 @@ class MainActivity:ComponentActivity() {
state.error?.let {error ->
Surface(color=role("errorSurface"),shape=MaterialTheme.shapes.large,modifier=Modifier.fillMaxWidth().padding(VSTheme.inset)) {
Column(Modifier.padding(VSTheme.inset)) {
- Text(tr(shortErrorKey(error.key)),color=role("errorForeground"),maxLines=1,overflow=androidx.compose.ui.text.style.TextOverflow.Ellipsis,modifier=Modifier.fillMaxWidth())
+ ErrorMessage(error.key,error.params,color=role("errorForeground"),modifier=Modifier.fillMaxWidth())
val models=error.key.split('.').take(2)==listOf("mobile","local")||error.key.contains("model")||error.key.contains("licence")
val connection=error.key.split('.').take(2)==listOf("mobile","connect")||error.key=="mobile.errors.offline"
val action=when {error.key=="mobile.permissions.denied" -> "mobile.permissions.open_settings";models -> "mobile.simple.download_models";connection -> "mobile.simple.reconnect";state.canRetry -> "mobile.simple.retry";else -> "common.close"}
@@ -114,6 +114,12 @@ class MainActivity:ComponentActivity() {
composable("connect") {ConnectScreen(vm)}
composable("settings") {SettingsScreen(vm,BuildConfig.VERSION_NAME,onConnect={nav.navigate("connect")},onModels={nav.navigate("models")})}
composable("models") {com.voicestudio.mobile.features.models.ModelsScreen(vm)}
+ composable("home") {HomeScreen(vm) {nav.navigate(it)}}
+ composable("host-dubs") {com.voicestudio.mobile.features.dub.ComputerDubScreen(vm)}
+ composable("projects") {com.voicestudio.mobile.features.dub.PhoneProjectScreen(vm)}
+ composable("project/{id}") {entry -> com.voicestudio.mobile.features.dub.PhoneProjectScreen(vm,entry.arguments?.getString("id"))}
+ composable("host-voice/{id}") {entry -> SpeakScreen(vm,initialComputerVoiceID=entry.arguments?.getString("id"))}
+ composable("voice/{id}") {entry -> SpeakScreen(vm,entry.arguments?.getString("id"))}
composable("speak") {SpeakScreen(vm)}
composable("voices") {VoicesScreen(vm)}
composable("dub") {DubScreen(vm)}
diff --git a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/DubPresentationRegressionTest.kt b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/DubPresentationRegressionTest.kt
index 470347b67..cd8fc3793 100644
--- a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/DubPresentationRegressionTest.kt
+++ b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/DubPresentationRegressionTest.kt
@@ -110,7 +110,10 @@ class DubPresentationRegressionTest {
CompositionLocalProvider(LocalLanguageCatalogLoader provides {awaitCancellation()}) {StudioApp(vm)}
}
for(tab in listOf("Speak","Voices","Dub","Dictate","Settings","Speak")) {
- compose.onNode(hasText(tab) and hasClickAction()).performClick()
+ if(tab=="Speak") {
+ compose.onNode(hasText("Home") and hasClickAction()).performClick()
+ compose.onNodeWithTag("home.speak").performScrollTo().performClick()
+ } else compose.onNode(hasText(tab) and hasClickAction()).performClick()
compose.onNode(hasText(tab) and SemanticsMatcher.keyIsDefined(androidx.compose.ui.semantics.SemanticsProperties.Heading)).assertExists()
}
}
diff --git a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/HostSwitchRegressionTest.kt b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/HostSwitchRegressionTest.kt
index 018a7febf..068c9a52e 100644
--- a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/HostSwitchRegressionTest.kt
+++ b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/HostSwitchRegressionTest.kt
@@ -115,6 +115,7 @@ class HostSwitchRegressionTest {
val player=mock(Player::class.java)
`when`(player.duration).thenReturn(1000)
compose.setContent {CompositionLocalProvider(LocalHostPlayerFactory provides {_,_->player}) {StudioApp(vm)}}
+ compose.onNodeWithTag("home.speak").performScrollTo().performClick()
compose.onNodeWithText("Type what you want to hear…").performTextInput("Text for A")
compose.onAllNodesWithContentDescription("Play").assertCountEquals(2)
val oldConnection=vm.state.value.connectionId
@@ -122,6 +123,7 @@ class HostSwitchRegressionTest {
compose.waitForIdle()
assertTrue(vm.state.value.connectionId>oldConnection)
verify(player).release()
+ compose.onNodeWithTag("home.speak").performScrollTo().performClick()
compose.onNodeWithText("Generated audio").assertDoesNotExist()
compose.onNodeWithText("Text for A").assertDoesNotExist()
compose.onAllNodesWithContentDescription("Play").assertCountEquals(1)
@@ -183,7 +185,12 @@ class HostSwitchRegressionTest {
}
}
}
- compose.waitUntil(5000) {compose.onAllNodesWithText(copy).fetchSemanticsNodes().isNotEmpty()}
+ // The receipt reaches the screen through a main-looper observer; drive the looper
+ // while waiting so a slow CI runner can't time out on an idle queue.
+ compose.waitUntil(20000) {
+ shadowOf(Looper.getMainLooper()).idle()
+ compose.onAllNodesWithText(copy).fetchSemanticsNodes().isNotEmpty()
+ }
compose.onNodeWithText(copy).assertExists()
compose.runOnIdle {shown=false};compose.waitForIdle()
// Recreate the view model/store as on a new launch; receipts must be durable.
diff --git a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/PhoneDubWorkerTest.kt b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/PhoneDubWorkerTest.kt
index 223f89d98..70a11494e 100644
--- a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/PhoneDubWorkerTest.kt
+++ b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/PhoneDubWorkerTest.kt
@@ -31,10 +31,28 @@ class PhoneDubWorkerTest {
assertTrue(promoted)
assertEquals(ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC,worker.getForegroundInfo().foregroundServiceType)
}
+ @Test fun phoneDubFailurePersistsRecoveryParametersInCheckpointAndWorkData()=runBlocking {
+ val app=context as Application
+ org.robolectric.Shadows.shadowOf(app.getSystemService(android.app.ActivityManager::class.java)).setMemoryInfo(android.app.ActivityManager.MemoryInfo().apply {totalMem=0})
+ val catalog=app.assets.open("models.json").bufferedReader().use {com.voicestudio.mobile.local.ModelCatalog.decode(it.readText())}
+ val models=listOf("asr","translate","clone").map {cap ->catalog.models.first {it.capability==cap}}
+ val runtime=com.voicestudio.mobile.local.PhoneRuntime.get(app)
+ models.filter {it.gated}.forEach {runtime.licence.record(it,true)}
+ val jobs=com.voicestudio.mobile.local.PhoneDubStore(java.io.File(app.noBackupFilesDir,"dubs"))
+ val source=java.io.File(app.cacheDir,"fixture.wav").apply {writeText("fixture")}
+ val job=jobs.create(source,"Fixture",listOf(com.voicestudio.mobile.local.DubTarget("fr","French")),models,true)
+ val worker=TestListenableWorkerBuilder<PhoneDubWorker>(app).setInputData(workDataOf("job" to job.id))
+ .setForegroundUpdater {_,_,_->CallbackToFutureAdapter.getFuture<Void> {it.set(null);"foreground"}}.build()
+ val ram=models.first().minRamGb.toString()
+ val result=worker.doWork() as ListenableWorker.Result.Failure
+ assertEquals("mobile.local.ram_required",result.outputData.getString("error"))
+ assertEquals("{\"ram\":\"$ram\"}",result.outputData.getString("error_params"))
+ assertEquals(mapOf("ram" to ram),jobs.checkpoint(job.id).errorParams)
+ }
@Test fun invalidCheckpointIsActionableWithoutComputerCredentials()=runBlocking {
val worker=TestListenableWorkerBuilder<PhoneDubWorker>(context).setInputData(workDataOf("job" to java.util.UUID.randomUUID().toString()))
.setForegroundUpdater {_,_,_->CallbackToFutureAdapter.getFuture<Void> {it.set(null);"foreground"}}.build()
val result=worker.doWork()
- assertEquals(ListenableWorker.Result.failure(workDataOf("job" to worker.inputData.getString("job"),"error" to "mobile.simple.checkpoint_failed")),result)
+ assertEquals(ListenableWorker.Result.failure(workDataOf("job" to worker.inputData.getString("job"),"error" to "mobile.simple.checkpoint_failed","error_params" to "{}")),result)
}
}
diff --git a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/PhoneNavigationTest.kt b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/PhoneNavigationTest.kt
index 8fe3e189e..6dd4da507 100644
--- a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/PhoneNavigationTest.kt
+++ b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/PhoneNavigationTest.kt
@@ -69,6 +69,7 @@ class PhoneNavigationTest {
assertFalse(model.fits(vm.phone.ramBytes))
compose.setContent {StudioApp(vm)}
compose.waitUntil(15000) {shadowOf(Looper.getMainLooper()).idle();model.id in vm.phone.state.value.installed&&!vm.state.value.loading}
+ compose.onNodeWithTag("home.speak").performScrollTo().performClick()
compose.onNodeWithText("Generate").assertDoesNotExist()
val l=com.voicestudio.mobile.l10n.L10n.load(app,"en")
compose.onNodeWithText(l.t("mobile.simple.ram",mapOf("ram" to model.minRamGb))).assertExists()
diff --git a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/PhoneVoiceUiTest.kt b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/PhoneVoiceUiTest.kt
index eaddcfa1a..a08b575cf 100644
--- a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/PhoneVoiceUiTest.kt
+++ b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/PhoneVoiceUiTest.kt
@@ -45,12 +45,17 @@ class PhoneVoiceUiTest {
compose.onNodeWithText("Voice name").performTextInput("New name")
compose.onNodeWithText("Save").performClick()
await {vm.phone.state.value.voices.any {it.name=="New name"}}
- compose.onNode(hasText("Speak") and hasClickAction()).performClick()
+ compose.onNode(hasText("Home") and hasClickAction()).performClick()
+ compose.onNodeWithTag("home.speak").performScrollTo().performClick()
compose.onNodeWithContentDescription(com.voicestudio.mobile.l10n.L10n.load(ApplicationProvider.getApplicationContext<Application>(),"en").let {l ->
l.t("mobile.android.selection",mapOf("label" to l.t("mobile.speak.voice"),"value" to l.t("mobile.local.preset_voice",mapOf("number" to 1))))}).performScrollTo().performClick()
compose.onNodeWithText("Search").performTextInput("New name")
compose.onNode(hasText("New name") and !hasSetTextAction()).performClick()
compose.onNodeWithText("New name").assertExists()
+ compose.onNode(hasText("Home") and hasClickAction()).performClick()
+ compose.onNodeWithText("New name").performScrollTo().performClick()
+ compose.onNodeWithText("New name").assertExists()
+ org.junit.Assert.assertEquals("phone",vm.preferences.value.runLocations["speak"])
compose.onNode(hasText("Voices") and hasClickAction()).performClick()
compose.onNodeWithContentDescription("More actions for New name").performScrollTo().performClick()
compose.onNodeWithText("Delete").performClick()
diff --git a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/ReviewUiRegressionTest.kt b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/ReviewUiRegressionTest.kt
new file mode 100644
index 000000000..1a90bdf57
--- /dev/null
+++ b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/ReviewUiRegressionTest.kt
@@ -0,0 +1,120 @@
+package com.voicestudio.mobile
+
+import android.app.Application
+import android.os.Looper
+import androidx.compose.runtime.*
+import androidx.compose.material3.*
+import androidx.compose.ui.test.*
+import androidx.compose.ui.test.junit4.createComposeRule
+import androidx.lifecycle.viewModelScope
+import androidx.test.core.app.ApplicationProvider
+import com.voicestudio.mobile.data.*
+import com.voicestudio.mobile.features.*
+import com.voicestudio.mobile.features.connect.ConnectScreen
+import com.voicestudio.mobile.features.speak.SpeakScreen
+import com.voicestudio.mobile.designsystem.VoiceStudioTheme
+import com.voicestudio.mobile.l10n.L10n
+import com.voicestudio.mobile.local.*
+import kotlinx.coroutines.*
+import org.junit.*
+import org.junit.Assert.*
+import org.junit.runner.RunWith
+import org.robolectric.RobolectricTestRunner
+import org.robolectric.Shadows.shadowOf
+import org.robolectric.annotation.Config
+import java.io.File
+
+@RunWith(RobolectricTestRunner::class)
+@Config(sdk=[34])
+class ReviewUiRegressionTest {
+ @get:Rule val compose=createComposeRule()
+ private val app get()=ApplicationProvider.getApplicationContext<Application>()
+ private fun vm(): StudioViewModel {
+ val store=SessionStore(app,object:CredentialVault {
+ override fun read(host:String):Secret?=null
+ override fun write(host:String,secret:Secret?)=Unit
+ })
+ runBlocking {store.update {Preferences(consent=false)}}
+ return StudioViewModel(app,store)
+ }
+ private fun await(condition: ()->Boolean) {compose.waitUntil(15000) {shadowOf(Looper.getMainLooper()).idle();condition()}}
+ private fun content(block: @Composable ()->Unit) {
+ compose.setContent {CompositionLocalProvider(LocalL10n provides L10n.load(app,"en")) {VoiceStudioTheme {block()}}}
+ }
+ @Test fun homeShowsRealEmptyLibrariesAndRoutesEveryCardOffline() {
+ val vm=vm()
+ var destination=""
+ try {
+ content {HomeScreen(vm) {destination=it}}
+ await {!vm.phone.state.value.loading}
+ compose.onNodeWithText("VoiceStudio.sh Open Source").assertExists()
+ for(route in listOf("speak","voices","dub","dictate","models","connect")) {
+ compose.onNodeWithTag("home.$route").performScrollTo().performClick()
+ assertEquals(route,destination)
+ }
+ compose.onNodeWithText("Your generations will appear here.").performScrollTo().assertIsDisplayed()
+ compose.onNodeWithText("No projects yet").performScrollTo().assertIsDisplayed()
+ assertNull(vm.api)
+ } finally {vm.viewModelScope.cancel()}
+ }
+ @Test fun successfulQrScanExposesAddressPinAndConnect() {
+ shadowOf(app).grantPermissions(android.Manifest.permission.CAMERA)
+ val vm=vm()
+ try {
+ content {ConnectScreen(vm,scanContent={ code,_,_ -> Button(onClick={code("http://192.168.1.5:8000/?pin=123456")}) {Text("Fixture QR")} })}
+ compose.onNodeWithText("Scan QR code").performClick()
+ compose.onNodeWithText("Fixture QR").performClick()
+ compose.onNodeWithText("Server address").assertExists()
+ compose.onNodeWithText("http://192.168.1.5:8000/").assertExists()
+ compose.onNode(hasText("Connect") and hasClickAction()).performScrollTo().assertIsEnabled()
+ } finally {vm.viewModelScope.cancel()}
+ }
+ @Test fun modelSwitchDropsOutOfRangePresetImmediately() {
+ shadowOf(app.getSystemService(android.app.ActivityManager::class.java)).setMemoryInfo(android.app.ActivityManager.MemoryInfo().apply {totalMem=16_000_000_000})
+ val vm=vm()
+ try {
+ content {SpeakScreen(vm)}
+ await {!vm.phone.state.value.loading&&vm.phone.state.value.models.isNotEmpty()}
+ val kokoro=vm.phone.state.value.models.first {it.id.contains("kokoro")}
+ val kitten=vm.phone.state.value.models.first {it.id.contains("kitten")}
+ vm.preference {it.copy(phoneModels=it.phoneModels+("speak" to kokoro.id))}
+ await {vm.preferences.value.phoneModels["speak"]==kokoro.id}
+ compose.onNodeWithContentDescription("Voice, currently Voice 1").performClick()
+ compose.onNodeWithText("Search").performTextInput("103")
+ compose.onNode(hasText("Voice 103") and !hasSetTextAction()).performClick()
+ compose.onNodeWithText("Voice 103").assertExists()
+ vm.preference {it.copy(phoneModels=it.phoneModels+("speak" to kitten.id))}
+ await {vm.preferences.value.phoneModels["speak"]==kitten.id}
+ compose.onNodeWithText("Voice 1").assertExists()
+ compose.onNodeWithText("Voice 103").assertDoesNotExist()
+ } finally {vm.viewModelScope.cancel()}
+ }
+ @Test fun errorsKeepShortTitleAndRecoveryCause() {
+ val vm=vm();val l=L10n.load(app,"en")
+ try {
+ compose.setContent {StudioApp(vm)}
+ await {!vm.state.value.loading}
+ vm.fail(com.voicestudio.mobile.network.ClientFailure("mobile.local.ram_required",mapOf("ram" to "6")))
+ compose.onNodeWithText(l.t("mobile.simple.models_error")).assertExists()
+ compose.onNodeWithText(l.t("mobile.local.ram_required",mapOf("ram" to "6"))).assertExists()
+ vm.fail(com.voicestudio.mobile.network.ClientFailure("mobile.connect.error_pin"))
+ compose.onNodeWithText(l.t("mobile.connect.error_pin")).assertExists()
+ } finally {vm.viewModelScope.cancel()}
+ }
+ @Test fun bundledNativeNoticesCoverPinnedRuntimesAndSherpaDependencies() {
+ val names=app.assets.list("licenses").orEmpty().toSet()
+ val required=setOf("sherpa-onnx","onnxruntime","espeak-ng-for-piper","piper-phonemize","kaldi-native-fbank","kissfft",
+ "kaldi-decoder","kaldifst","openfst","simple-sentencepiece","json","hclust-cpp","omnivoice.cpp","omnivoice-ggml","llama.cpp","llama-ggml","eigen")
+ required.forEach {assertTrue("Missing notice: $it", "native-$it.txt" in names)}
+ val corresponding=app.assets.open("licenses/native-Corresponding-source.txt").bufferedReader().use {it.readText()}
+ assertTrue(corresponding.contains("GPL-3.0"));assertTrue(corresponding.contains("ed530aa113046142eb5115cf2fc9157854d0ffe1"))
+ }
+ @Test fun nativeBuildUsesOneFetchAndRecordingStopsUnderDecoderLimit() {
+ val root=File(requireNotNull(System.getProperty("androidRoot")))
+ val appBuild=File(root,"app/build.gradle.kts").readText()
+ assertTrue(appBuild.contains("dependsOn(\":core:local:fetchRuntimes\")"))
+ assertTrue(appBuild.contains("\"--skip-fetch\""))
+ val recording=File(root,"features/src/main/kotlin/com/voicestudio/mobile/features/voices/VoicesScreen.kt").readText()
+ assertTrue(recording.contains("seconds>=29"))
+ }
+}
diff --git a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/StudioSmokeTest.kt b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/StudioSmokeTest.kt
index dd98e0ee7..74152c475 100644
--- a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/StudioSmokeTest.kt
+++ b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/StudioSmokeTest.kt
@@ -69,6 +69,7 @@ class StudioSmokeTest {
compose.onAllNodesWithText("Connect").filter(hasClickAction()).onFirst().performScrollTo().performClick()
awaitCondition {vm.state.value.connected&&engineRead.count==0L}
compose.onAllNodes(isDialog()).assertCountEquals(0)
+ compose.onNodeWithTag("home.speak").performScrollTo().performClick()
compose.onNodeWithText("Type what you want to hear…").performTextInput("A local generation")
releaseEngines.countDown()
awaitCondition {!vm.state.value.busy}
diff --git a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/UiPolishRegressionTest.kt b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/UiPolishRegressionTest.kt
index a8dbb9473..76b228e60 100644
--- a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/UiPolishRegressionTest.kt
+++ b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/UiPolishRegressionTest.kt
@@ -43,6 +43,7 @@ class UiPolishRegressionTest {
}
compose.onNodeWithContentDescription("Models").assertDoesNotExist()
}
+ compose.onNodeWithTag("home.speak").performScrollTo().performClick()
noIdentifiers()
compose.onAllNodesWithText("Get").assertCountEquals(1)
tab("Voices");noIdentifiers()
diff --git a/mobile/android/core/data/src/main/kotlin/com/voicestudio/mobile/data/PhoneDubWorker.kt b/mobile/android/core/data/src/main/kotlin/com/voicestudio/mobile/data/PhoneDubWorker.kt
index 4b2129e3a..163860486 100644
--- a/mobile/android/core/data/src/main/kotlin/com/voicestudio/mobile/data/PhoneDubWorker.kt
+++ b/mobile/android/core/data/src/main/kotlin/com/voicestudio/mobile/data/PhoneDubWorker.kt
@@ -16,6 +16,7 @@ import com.voicestudio.mobile.l10n.L10n
import com.voicestudio.mobile.local.*
import com.voicestudio.mobile.network.ClientFailure
import kotlinx.coroutines.*
+import kotlinx.serialization.encodeToString
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.flow.first
import java.io.File
@@ -74,8 +75,9 @@ class PhoneDubWorker(context: Context,params: WorkerParameters): CoroutineWorker
throw e
} catch(e:Exception) {
val key=(e as? ClientFailure)?.key ?: "mobile.simple.dub_failed"
- withContext(NonCancellable) {runCatching {val checkpoint=jobs.checkpoint(job);jobs.save(job,checkpoint.copy(stage=key))}}
- return Result.failure(workDataOf("job" to job,"error" to key))
+ val params=(e as? ClientFailure)?.params.orEmpty().mapValues {it.value.toString()}
+ withContext(NonCancellable) {runCatching {val checkpoint=jobs.checkpoint(job);jobs.save(job,checkpoint.copy(stage=key,errorParams=params))}}
+ return Result.failure(workDataOf("job" to job,"error" to key,"error_params" to kotlinx.serialization.json.Json.encodeToString(params)))
}
}
companion object {
diff --git a/mobile/android/core/local/build.gradle.kts b/mobile/android/core/local/build.gradle.kts
index 751ba8cd6..26a813b3d 100644
--- a/mobile/android/core/local/build.gradle.kts
+++ b/mobile/android/core/local/build.gradle.kts
@@ -19,6 +19,7 @@ val nativeRoot = rootDir.resolve("../native/android")
val fetchRuntimes by tasks.registering(Exec::class) {
inputs.files(nativeRoot.resolve("fetch.py"), nativeRoot.resolve("source-checksums.json"), nativeRoot.resolve("../pins.json"))
outputs.files(nativeRoot.resolve("build/downloads/sherpa.aar"), layout.buildDirectory.file("sherpa/classes.jar"))
+ outputs.dir(nativeRoot.resolve("build/sources"))
commandLine("python3", nativeRoot.resolve("fetch.py"))
doLast {
copy { from(zipTree(nativeRoot.resolve("build/downloads/sherpa.aar"))); include("classes.jar"); into(layout.buildDirectory.dir("sherpa")) }
diff --git a/mobile/android/core/local/src/main/kotlin/com/voicestudio/mobile/local/LocalEngine.kt b/mobile/android/core/local/src/main/kotlin/com/voicestudio/mobile/local/LocalEngine.kt
index 278334715..39eae1a00 100644
--- a/mobile/android/core/local/src/main/kotlin/com/voicestudio/mobile/local/LocalEngine.kt
+++ b/mobile/android/core/local/src/main/kotlin/com/voicestudio/mobile/local/LocalEngine.kt
@@ -43,7 +43,7 @@ internal object NativeBridge {
class PhoneLocalEngine(private val models: ModelDownloads): LocalEngine {
companion object {private val nativeLease=Mutex()}
- private suspend fun <T> execute(model: PhoneModel, capability: String, progress: (Float)->Unit, block: suspend (File,Job)->T): T =
+ internal suspend fun <T> execute(model: PhoneModel, capability: String, progress: (Float)->Unit, block: suspend (File,Job)->T): T =
withContext(Dispatchers.Default) {
if(model.capability != capability) throw ClientFailure("mobile.local.model_incompatible")
try {
diff --git a/mobile/android/core/local/src/main/kotlin/com/voicestudio/mobile/local/ModelDownloads.kt b/mobile/android/core/local/src/main/kotlin/com/voicestudio/mobile/local/ModelDownloads.kt
index b13eb4462..34983dd5d 100644
--- a/mobile/android/core/local/src/main/kotlin/com/voicestudio/mobile/local/ModelDownloads.kt
+++ b/mobile/android/core/local/src/main/kotlin/com/voicestudio/mobile/local/ModelDownloads.kt
@@ -25,9 +25,24 @@ class ModelDownloads internal constructor(
private val wifi: () -> Boolean, private val freeBytes: () -> Long,
private val client: OkHttpClient = OkHttpClient.Builder().followRedirects(false).followSslRedirects(false).build(),
private val endpoints: List<String> = listOf("https://huggingface.co", "https://hf-mirror.com"),
- private val allowTestHttp: Boolean = false
+ private val allowTestHttp: Boolean = false,
+ private val digest: (File, ()->Unit)->String = ::sha256
) {
constructor(root: File, licence: LicenceGate, ramBytes: Long, wifi: () -> Boolean) : this(root,licence,ramBytes,wifi,{root.apply {mkdirs()}.usableSpace})
+ private data class VerifiedStamp(val size: Long, val modified: Long, val catalogue: String)
+ private val verified=ConcurrentHashMap<File,VerifiedStamp>()
+ private fun stamp(file: File, catalogue: String)=VerifiedStamp(file.length(),file.lastModified(),catalogue)
+ private fun verifiedFile(file: File, expected: ModelFile, catalogue: String, check: ()->Unit): Boolean {
+ check()
+ if(!file.isFile||file.length()!=expected.size) {verified.remove(file);return false}
+ val before=stamp(file,catalogue)
+ if(verified[file]==before) return true
+ verified.remove(file)
+ if(digest(file,check)!=expected.sha256||stamp(file,catalogue)!=before) return false
+ verified[file]=before
+ return true
+ }
+ private fun invalidate(model: PhoneModel) {model.files.forEach {verified.remove(File(dir(model),it.path))}}
private val locks=ConcurrentHashMap<String,Mutex>()
private fun lock(model: PhoneModel)=locks.getOrPut(model.id) {Mutex()}
private val mutable=MutableStateFlow<Map<String,DownloadProgress>>(emptyMap())
@@ -47,7 +62,12 @@ class ModelDownloads internal constructor(
fit(model);licence.requireAccepted(model);networkAllowed(allowMobile)
val job=currentCoroutineContext().job
val directory=dir(model).apply {mkdirs()}
- val needed=model.files.sumOf { f -> (f.size-File(directory,f.path+".part").length()).coerceAtLeast(0) }
+ val catalogue=modelPin(model).identity
+ val completedFiles=model.files.filter {verifiedFile(File(directory,it.path),it,catalogue) {job.ensureActive()}}.toSet()
+ val needed=model.files.filterNot {it in completedFiles}.sumOf { f ->
+ val partial=File(directory,f.path+".part").length().takeIf {it<=f.size} ?: 0L
+ f.size-partial
+ }
if(freeBytes()<needed+16*1024*1024) throw ClientFailure("mobile.local.storage_required")
mutable.update {it+(model.id to DownloadProgress(total=model.totalBytes,running=true))}
try {
@@ -55,8 +75,8 @@ class ModelDownloads internal constructor(
model.files.forEach { f ->
currentCoroutineContext().ensureActive();licence.requireAccepted(model)
val target=File(directory,f.path).apply {parentFile!!.mkdirs()}
- if(target.isFile&&target.length()==f.size&&sha256(target) {job.ensureActive()}==f.sha256) {completed+=f.size;return@forEach}
- target.delete()
+ if(f in completedFiles) {completed+=f.size;return@forEach}
+ verified.remove(target);target.delete()
val part=File(directory,f.path+".part")
if(part.length()>f.size) part.delete()
var last: IOException?=null
@@ -68,9 +88,10 @@ class ModelDownloads internal constructor(
}
if(last!=null) throw ClientFailure("mobile.local.download_failed")
currentCoroutineContext().ensureActive()
- if(part.length()!=f.size||sha256(part) {job.ensureActive()}!=f.sha256) {part.delete();throw ClientFailure("mobile.local.checksum_failed")}
+ if(part.length()!=f.size||digest(part) {job.ensureActive()}!=f.sha256) {part.delete();throw ClientFailure("mobile.local.checksum_failed")}
licence.requireAccepted(model)
if(!part.renameTo(target)) throw ClientFailure("mobile.local.storage_required")
+ verified[target]=stamp(target,catalogue)
completed+=f.size
}
licence.requireAccepted(model)
@@ -132,18 +153,25 @@ class ModelDownloads internal constructor(
throw IOException("Too many download redirects")
}
suspend fun delete(model: PhoneModel) = withContext(Dispatchers.IO) {lock(model).withLock {
+ invalidate(model)
if(dir(model).exists()&&!dir(model).deleteRecursively()) throw ClientFailure("mobile.local.storage_required")
mutable.update {it-model.id}
}}
- /** Same lease protects inference from deletion. Hash every file before use. */
+ /** Deletion and inference share a lease. Rehash only changed files or after a failed native use. */
suspend fun <T> withModel(model: PhoneModel, use: suspend (File)->T): T = withContext(Dispatchers.IO) {lock(model).withLock {
fit(model);licence.requireAccepted(model)
if(!installed(model)) throw ClientFailure("mobile.local.model_required")
val job=currentCoroutineContext().job
+ val catalogue=modelPin(model).identity
model.files.forEach { f ->
currentCoroutineContext().ensureActive()
- if(sha256(File(dir(model),f.path)) {job.ensureActive()}!=f.sha256) {File(dir(model),".verified").delete();throw ClientFailure("mobile.local.checksum_failed")}
+ if(!verifiedFile(File(dir(model),f.path),f,catalogue) {job.ensureActive()}) {
+ invalidate(model);File(dir(model),".verified").delete();throw ClientFailure("mobile.local.checksum_failed")
+ }
}
- licence.requireAccepted(model);use(dir(model))
+ licence.requireAccepted(model)
+ try {use(dir(model))}
+ catch(e:CancellationException) {throw e}
+ catch(e:Throwable) {invalidate(model);throw e}
}}
}
diff --git a/mobile/android/core/local/src/main/kotlin/com/voicestudio/mobile/local/PhoneDub.kt b/mobile/android/core/local/src/main/kotlin/com/voicestudio/mobile/local/PhoneDub.kt
index 0010a6c53..846bc1df7 100644
--- a/mobile/android/core/local/src/main/kotlin/com/voicestudio/mobile/local/PhoneDub.kt
+++ b/mobile/android/core/local/src/main/kotlin/com/voicestudio/mobile/local/PhoneDub.kt
@@ -17,7 +17,7 @@ import java.util.UUID
@Serializable data class DubRender(val index: Int,val sha256: String,val frames: Long)
@Serializable data class PhoneDubOutput(val language: String,val name: String,val file: String,val sha256: String,val duration: Double)
@Serializable data class PhoneDubCheckpoint(val frames: Long = 0,val nextFrame: Long = 0,val segments: List<DubSegmentState> = emptyList(),
- val renders: List<DubRender> = emptyList(),val outputs: List<PhoneDubOutput> = emptyList(),val stage: String = "mobile.android.stage_prepare",val percent: Int = 0,val done: Boolean = false)
+ val renders: List<DubRender> = emptyList(),val outputs: List<PhoneDubOutput> = emptyList(),val stage: String = "mobile.android.stage_prepare",val percent: Int = 0,val done: Boolean = false,val errorParams: Map<String,String> = emptyMap())
data class PhoneDubRecord(val request: PhoneDubRequest,val checkpoint: PhoneDubCheckpoint)
data class DubProgress(val stage: String,val percent: Int)
fun modelPin(model: PhoneModel): DubModelPin {
@@ -70,7 +70,11 @@ class PhoneDubStore(private val root: File) {
catch(e:CancellationException) {throw e} catch(e:Exception) {throw ClientFailure("mobile.simple.checkpoint_failed")}
}
suspend fun list(): List<PhoneDubRecord> = withContext(Dispatchers.IO) {
- root.listFiles().orEmpty().filter {File(it,"request.json").exists()}.map {PhoneDubRecord(request(it.name),checkpoint(it.name))}.sortedByDescending {it.request.createdAt}
+ root.listFiles().orEmpty().filter {File(it,"request.json").exists()}.mapNotNull {
+ currentCoroutineContext().ensureActive()
+ try {PhoneDubRecord(request(it.name),checkpoint(it.name))}
+ catch(e:CancellationException) {throw e} catch(_:Exception) {null}
+ }.sortedByDescending {it.request.createdAt}
}
suspend fun delete(id: String) = withContext(Dispatchers.IO) {if(!directory(id).deleteRecursively()) throw ClientFailure("mobile.simple.checkpoint_failed")}
}
@@ -87,7 +91,7 @@ class PhoneDubPipeline(private val store: PhoneDubStore,private val engine: Loca
val asr=models.single {it.capability=="asr"};val translator=models.single {it.capability=="translate"};val clone=models.single {it.capability=="clone"}
var checkpoint=store.checkpoint(id)
suspend fun save(value: PhoneDubCheckpoint) {authorize();currentCoroutineContext().ensureActive();store.save(id,value);checkpoint=value}
- suspend fun stage(key: String,percent: Int) {save(checkpoint.copy(stage=key,percent=percent));report(DubProgress(key,percent))}
+ suspend fun stage(key: String,percent: Int) {save(checkpoint.copy(stage=key,percent=percent,errorParams=emptyMap()));report(DubProgress(key,percent))}
fun nativeProgress(key: String,base: Int,span: Int): (Float)->Unit = {value ->report(DubProgress(key,(base+value.coerceIn(0f,1f)*span).toInt().coerceIn(0,99)))}
if(checkpoint.done&&checkpoint.outputs.size==request.targets.size&&checkpoint.outputs.all {output ->
val file=store.file(id,output.file);file.exists()&&sha256(file)==output.sha256
@@ -145,10 +149,12 @@ class PhoneDubPipeline(private val store: PhoneDubStore,private val engine: Loca
val reference=if(request.referenceText!=null) {
val saved=PcmFile(store.file(id,"voice-reference.pcm"));saved.read(0,saved.frames.toInt())
} else pcm.clip(segment.speech.start,minOf(segment.speech.end,segment.speech.start+8.0))
- val referenceText=request.referenceText ?: segment.referenceText ?: engine.transcribe(asr,reference).trim().also {text ->
- if(text.isBlank()) throw ClientFailure("mobile.simple.no_speech")
+ val referenceText=request.referenceText ?: segment.referenceText?.takeIf {it.isNotBlank()} ?: run {
+ val text=if(segment.speech.end-segment.speech.start<=8.0) segment.speech.text
+ else engine.transcribe(asr,reference).trim().ifBlank {segment.speech.text}
segment=segment.copy(referenceText=text)
save(checkpoint.copy(segments=checkpoint.segments.toMutableList().also {it[index]=segment}))
+ text
}
val generated=engine.clone(clone,requireNotNull(segment.translations[target.code]),reference,referenceText,nativeProgress("mobile.android.stage_render",base,1))
val fitted=fitTiming(generated,frames)
diff --git a/mobile/android/core/local/src/main/kotlin/com/voicestudio/mobile/local/PhoneVoices.kt b/mobile/android/core/local/src/main/kotlin/com/voicestudio/mobile/local/PhoneVoices.kt
index 08e9321fa..103d136ca 100644
--- a/mobile/android/core/local/src/main/kotlin/com/voicestudio/mobile/local/PhoneVoices.kt
+++ b/mobile/android/core/local/src/main/kotlin/com/voicestudio/mobile/local/PhoneVoices.kt
@@ -30,10 +30,13 @@ class PhoneVoiceStore(private val root: File) {
root.listFiles().orEmpty().filter {it.isDirectory&&!it.name.startsWith('.')}.mapNotNull {dir ->
val metadata=File(dir,"voice.json")
if(!metadata.exists()) return@mapNotNull null
- val voice=LocalJson.decodeFromString<PhoneVoice>(metadata.readText())
- require(voice.id==dir.name&&voice.sampleRate==24000&&voice.transcript.isNotBlank()&&voice.name.isNotBlank())
- require(File(dir,"reference.pcm").length() in 9600..2_880_000)
- voice
+ try {
+ val voice=LocalJson.decodeFromString<PhoneVoice>(metadata.readText())
+ directory(voice.id)
+ require(voice.id==dir.name&&voice.sampleRate==24000&&voice.transcript.isNotBlank()&&voice.name.isNotBlank())
+ require(File(dir,"reference.pcm").length() in 9600..2_880_000)
+ voice
+ } catch(e:CancellationException) {throw e} catch(_:Exception) {null}
}.sortedByDescending {it.createdAt}
}}
suspend fun create(name: String, source: File, consent: Boolean, asr: PhoneModel, engine: LocalEngine,
diff --git a/mobile/android/core/local/src/test/kotlin/com/voicestudio/mobile/local/PhoneDubTest.kt b/mobile/android/core/local/src/test/kotlin/com/voicestudio/mobile/local/PhoneDubTest.kt
index d1c018ca9..2f04cd61b 100644
--- a/mobile/android/core/local/src/test/kotlin/com/voicestudio/mobile/local/PhoneDubTest.kt
+++ b/mobile/android/core/local/src/test/kotlin/com/voicestudio/mobile/local/PhoneDubTest.kt
@@ -74,7 +74,7 @@ class PhoneDubTest {
val pipeline=PhoneDubPipeline(store,engine,decoder,media)
try {pipeline.run(request.id,models);fail()} catch(_:CancellationException) {}
val saved=store.checkpoint(request.id)
- assertEquals("French translation",saved.segments.first().translations["fr"]);assertEquals("Reference transcript",saved.segments.first().referenceText)
+ assertEquals("French translation",saved.segments.first().translations["fr"]);assertEquals("First sentence",saved.segments.first().referenceText)
assertFalse(saved.done)
pipeline.run(request.id,models)
assertEquals(2,engine.translated);assertEquals(2,engine.cloned);assertEquals(1,decodes);assertEquals(1,engine.transcribed)
@@ -114,6 +114,47 @@ class PhoneDubTest {
store.file(request.id,"checkpoint.json").writeText("not json")
try {store.checkpoint(request.id);fail()} catch(e:ClientFailure) {assertEquals("mobile.simple.checkpoint_failed",e.key)}
}
+ @Test fun unreadableDubDoesNotHideHealthyJobs()=runTest {
+ val store=store();val healthy=request(store);val broken=request(store)
+ store.file(broken.id,"checkpoint.json").writeText("broken")
+ assertEquals(listOf(healthy),store.list().map {it.request})
+ }
+ @Test fun blankReferenceTranscriptionFallsBackAndResumeUsesSavedText()=runTest {
+ val store=store();val request=request(store,targets.take(1))
+ val engine=object: Engine() {
+ var referenceCalls=0;var interrupt=true
+ override suspend fun transcribe(model: PhoneModel,audio: LocalAudio,progress: (Float)->Unit): String {referenceCalls++;return " "}
+ override suspend fun clone(model: PhoneModel,text: String,reference: LocalAudio,referenceText: String,progress: (Float)->Unit): LocalAudio {
+ assertEquals(if(cloned==0) "First sentence" else "Second sentence",referenceText)
+ if(interrupt) {interrupt=false;throw CancellationException("resume")}
+ return super.clone(model,text,reference,referenceText,progress)
+ }
+ }
+ val pipeline=PhoneDubPipeline(store,engine,decoder,media)
+ try {pipeline.run(request.id,models);fail()} catch(_:CancellationException) {}
+ assertEquals("First sentence",store.checkpoint(request.id).segments.first().referenceText)
+ assertTrue(pipeline.run(request.id,models).done)
+ assertEquals("Whole-segment clips already have exact transcripts",0,engine.referenceCalls)
+ }
+ @Test fun blankTranscriptionOfShortenedReferenceUsesSegmentText()=runTest {
+ val longDecoder=object: AudioDecoder {
+ override suspend fun decode(source: File,output: File,maxSeconds: Int,progress: (Float)->Unit): PcmFile {
+ writePcm(LocalAudio(FloatArray(24000*10) {.25f},24000),output);return PcmFile(output)
+ }
+ }
+ val engine=object: Engine() {
+ var referenceCalls=0
+ override suspend fun transcribeSegments(model: PhoneModel,audio: LocalAudio,progress: (Float)->Unit)=listOf(SpeechSegment(0.0,10.0,"Long sentence"))
+ override suspend fun transcribe(model: PhoneModel,audio: LocalAudio,progress: (Float)->Unit): String {referenceCalls++;return " "}
+ override suspend fun clone(model: PhoneModel,text: String,reference: LocalAudio,referenceText: String,progress: (Float)->Unit): LocalAudio {
+ assertEquals("Long sentence",referenceText);return super.clone(model,text,reference,referenceText,progress)
+ }
+ }
+ val store=store();val request=request(store,targets.take(1))
+ assertTrue(PhoneDubPipeline(store,engine,longDecoder,media).run(request.id,models).done)
+ assertEquals(1,engine.referenceCalls)
+ assertEquals("Long sentence",store.checkpoint(request.id).segments.single().referenceText)
+ }
@Test fun timingPadsSilenceAndCompressionPreservesPitch()=runTest {
val padded=fitTiming(LocalAudio(floatArrayOf(.1f,.2f),24000),5)
assertArrayEquals(floatArrayOf(.1f,.2f,0f,0f,0f),padded.samples,0f)
diff --git a/mobile/android/core/local/src/test/kotlin/com/voicestudio/mobile/local/PhoneVoicesTest.kt b/mobile/android/core/local/src/test/kotlin/com/voicestudio/mobile/local/PhoneVoicesTest.kt
index 9a25b0b2c..2e3c9ecc0 100644
--- a/mobile/android/core/local/src/test/kotlin/com/voicestudio/mobile/local/PhoneVoicesTest.kt
+++ b/mobile/android/core/local/src/test/kotlin/com/voicestudio/mobile/local/PhoneVoicesTest.kt
@@ -51,6 +51,13 @@ class PhoneVoicesTest {
try {store.create("Name",File("unused"),true,fixtureModel(),silent,decoder);fail()} catch(e:com.voicestudio.mobile.network.ClientFailure) {assertEquals("mobile.simple.no_speech",e.key)}
assertTrue(store.list().isEmpty())
}
+ @Test fun oneUnreadableVoiceDoesNotHideHealthyVoices()=runTest {
+ val root=File(temporary.root,"voices");val store=PhoneVoiceStore(root)
+ val voice=store.create("Healthy",File("unused"),true,fixtureModel(),FakeLocalEngine(),decoder)
+ File(root,"broken/voice.json").apply {parentFile!!.mkdirs();writeText("not json")}
+ File(root,"bad-metadata/voice.json").apply {parentFile!!.mkdirs();writeText(LocalJson.encodeToString(PhoneVoice.serializer(),voice.copy(name="")))}
+ assertEquals(listOf(voice),store.list())
+ }
@Test fun pathsCannotEscapePrivateVoiceDirectory()=runTest {
val store=PhoneVoiceStore(File(temporary.root,"voices"))
try {store.reference(PhoneVoice("../escape","N","T",1,1));fail()} catch(_:IllegalArgumentException) {}
diff --git a/mobile/android/core/local/src/test/kotlin/com/voicestudio/mobile/local/ReviewRegressionTest.kt b/mobile/android/core/local/src/test/kotlin/com/voicestudio/mobile/local/ReviewRegressionTest.kt
new file mode 100644
index 000000000..2d874419d
--- /dev/null
+++ b/mobile/android/core/local/src/test/kotlin/com/voicestudio/mobile/local/ReviewRegressionTest.kt
@@ -0,0 +1,71 @@
+package com.voicestudio.mobile.local
+
+import com.voicestudio.mobile.network.ClientFailure
+import kotlinx.coroutines.*
+import kotlinx.coroutines.test.runTest
+import okhttp3.OkHttpClient
+import okhttp3.mockwebserver.MockResponse
+import okhttp3.mockwebserver.MockWebServer
+import org.junit.*
+import org.junit.Assert.*
+import org.junit.rules.TemporaryFolder
+import java.io.File
+import java.util.concurrent.CountDownLatch
+import java.util.concurrent.TimeUnit
+
+class ReviewRegressionTest {
+ @get:Rule val temporary=TemporaryFolder()
+ private val content="verified weights".toByteArray()
+ private val hash=java.security.MessageDigest.getInstance("SHA-256").digest(content).joinToString("") {"%02x".format(it)}
+ private val model=fixtureModel("tts").copy(id="fixture",files=listOf(ModelFile("weights",content.size.toLong(),hash,"model")),totalBytes=content.size.toLong())
+ private fun target()=File(temporary.root,"models/fixture/weights")
+ private var hashes=0
+ private fun downloads(server: MockWebServer, free: ()->Long={Long.MAX_VALUE})=ModelDownloads(
+ File(temporary.root,"models"),LicenceGate(File(temporary.root,"licences"),"test"),8_000_000_000,{true},free,
+ OkHttpClient(),listOf(server.url("/").toString()),true,{ file,check -> hashes++;sha256(file,check) })
+ @Test fun resumeCountsOnlyRemainingBytesAndDoesNotTrustCorruptCompletedFiles()=runTest {
+ MockWebServer().use { server -> server.start()
+ target().apply {parentFile!!.mkdirs();writeBytes(content)}
+ val selection=model.copy(files=model.files+ModelFile("remaining",content.size.toLong(),hash,"tokens"),totalBytes=content.size*2L)
+ server.enqueue(MockResponse().setBody(String(content)))
+ var available=16*1024*1024+content.size.toLong()
+ val downloads=downloads(server) {available}
+ downloads.download(selection,false)
+ assertTrue(downloads.installed(selection));assertEquals(1,server.requestCount)
+ target().writeBytes(ByteArray(content.size));target().setLastModified(target().lastModified()+2000)
+ available=16*1024*1024L
+ try {downloads.download(selection,false);fail("Damaged completed bytes need storage too")}
+ catch(e:ClientFailure) {assertEquals("mobile.local.storage_required",e.key)}
+ }
+ }
+ @Test fun modelHashesAreCachedUntilStampCatalogueOrNativeFailureChanges()=runTest {
+ MockWebServer().use {server -> server.start();server.enqueue(MockResponse().setBody(String(content)))
+ val downloads=downloads(server);downloads.download(model,false);assertEquals(1,hashes)
+ repeat(3) {downloads.withModel(model) {}}
+ assertEquals("Inference must reuse install verification",1,hashes)
+ target().setLastModified(target().lastModified()+2000)
+ downloads.withModel(model) {};assertEquals(2,hashes)
+ val changed=model.copy(config=kotlinx.serialization.json.buildJsonObject {put("threads",kotlinx.serialization.json.JsonPrimitive(2))})
+ downloads.withModel(changed) {};assertEquals(3,hashes)
+ try {downloads.withModel(changed) {throw IllegalStateException("native load")}} catch(_:IllegalStateException) {}
+ downloads.withModel(changed) {};assertEquals(4,hashes)
+ target().writeBytes(ByteArray(content.size));target().setLastModified(target().lastModified()+2000)
+ try {downloads.withModel(changed) {};fail("Changed bytes accepted")}
+ catch(e:ClientFailure) {assertEquals("mobile.local.checksum_failed",e.key)}
+ assertFalse(downloads.installed(model))
+ }
+ }
+ @Test fun nativeLeaseSurvivesCancellationUntilNativeWorkReturns()=runTest {
+ MockWebServer().use {server -> server.start();server.enqueue(MockResponse().setBody(String(content)))
+ val downloads=downloads(server);downloads.download(model,false);val engine=PhoneLocalEngine(downloads)
+ val entered=CountDownLatch(1);val release=CountDownLatch(1);val secondEntered=CountDownLatch(1)
+ val first=launch(Dispatchers.Default) {engine.execute(model,"tts",{}) {_,_ -> entered.countDown();check(release.await(10,TimeUnit.SECONDS))}}
+ try {
+ assertTrue(entered.await(10,TimeUnit.SECONDS));first.cancel()
+ val second=launch(Dispatchers.Default) {engine.execute(model,"tts",{}) {_,_ -> secondEntered.countDown()}}
+ assertFalse("Cancelled native work still owns the lease",secondEntered.await(200,TimeUnit.MILLISECONDS))
+ release.countDown();first.join();second.join();assertEquals(0L,secondEntered.count)
+ } finally {release.countDown();first.cancelAndJoin()}
+ }
+ }
+}
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/Components.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/Components.kt
index 0981f2454..852b08513 100644
--- a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/Components.kt
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/Components.kt
@@ -263,6 +263,16 @@ fun shortErrorKey(key: String): String = when {
key.split('.').take(2)==listOf("mobile","connect")||key=="mobile.errors.offline" -> "mobile.simple.connection_error"
else -> "mobile.simple.error"
}
+/** Keep the compact title while preserving the localized cause and recovery step. */
+@Composable fun ErrorMessage(key: String, params: Map<String,Any> = emptyMap(), modifier: Modifier = Modifier, color: Color = role("error")) {
+ val l=LocalL10n.current
+ val title=shortErrorKey(key)
+ Column(modifier,verticalArrangement=Arrangement.spacedBy(VSTheme.gap/2)) {
+ Text(l.t(title),color=color,style=MaterialTheme.typography.titleSmall)
+ if(key!=title&&l.has(key)) Text(l.t(key,params),color=color,style=MaterialTheme.typography.bodySmall)
+ }
+}
+
@Composable fun EmptyState(key: String,icon: ImageVector = Icons.Default.Info) {
Row(Modifier.fillMaxWidth().heightIn(min=VSTheme.touchTarget),verticalAlignment=Alignment.CenterVertically,horizontalArrangement=Arrangement.spacedBy(VSTheme.gap)) {
Icon(icon,contentDescription=null,tint=role("textMuted"));Text(tr(key),color=role("textMuted"))
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/HomeScreen.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/HomeScreen.kt
new file mode 100644
index 000000000..36878b012
--- /dev/null
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/HomeScreen.kt
@@ -0,0 +1,151 @@
+package com.voicestudio.mobile.features
+
+import android.graphics.BitmapFactory
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.BorderStroke
+import androidx.compose.foundation.layout.*
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.*
+import androidx.compose.material.icons.automirrored.filled.ArrowForward
+import androidx.compose.material3.*
+import androidx.compose.runtime.*
+import androidx.compose.runtime.saveable.rememberSaveable
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.ImageBitmap
+import androidx.compose.ui.graphics.asImageBitmap
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.platform.testTag
+import androidx.compose.ui.semantics.heading
+import androidx.compose.ui.semantics.semantics
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.style.TextOverflow
+import androidx.compose.ui.unit.dp
+import com.voicestudio.mobile.designsystem.*
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.withContext
+
+private data class HomeDestination(val route: String, val title: String, val detail: String,
+ val icon: androidx.compose.ui.graphics.vector.ImageVector, val primary: Boolean = false)
+private val destinations = listOf(
+ HomeDestination("speak", "mobile.tabs.speak", "mobile.speak.placeholder", VSIcons.Wave, true),
+ HomeDestination("voices", "nav.clone", "clone.reference_hint", Icons.Default.Person, true),
+ HomeDestination("dub", "nav.dub", "homeUi.dub", VSIcons.Video, true),
+ HomeDestination("dictate", "nav.dictation", "mobile.dictate.tap_to_start", VSIcons.Mic),
+ HomeDestination("models", "mobile.local.models", "mobile.local.installed", VSIcons.Download),
+ HomeDestination("connect", "mobile.local.my_computer", "mobile.local.pair_settings", VSIcons.Computer),
+)
+
+@Composable fun HomeScreen(vm: StudioViewModel, navigate: (String)->Unit) {
+ val phone by vm.phone.state.collectAsState()
+ val host by vm.state.collectAsState()
+ val context = LocalContext.current
+ val artwork by produceState<ImageBitmap?>(null, context) {
+ value = withContext(Dispatchers.IO) { context.assets.open("signal-field.webp").use { BitmapFactory.decodeStream(it)?.asImageBitmap() } }
+ }
+ var audioSource by rememberSaveable { mutableStateOf<String?>(null) }
+ LaunchedEffect(Unit) {
+ try { vm.phone.refresh() } catch(e: kotlinx.coroutines.CancellationException) {throw e} catch(e: Exception) {vm.fail(e)}
+ }
+ Screen {
+ Column(Modifier.widthIn(max=900.dp).fillMaxWidth().align(Alignment.CenterHorizontally), verticalArrangement=Arrangement.spacedBy(VSTheme.gap*2)) {
+ Row(Modifier.fillMaxWidth(), verticalAlignment=Alignment.CenterVertically) {
+ Text(tr("nav.home"), Modifier.weight(1f).semantics { heading() }, style=MaterialTheme.typography.titleMedium)
+ TextButton(onClick={navigate("projects")}) { Icon(VSIcons.Folder,null); Text(tr("projects.title")) }
+ }
+ Surface(shape=MaterialTheme.shapes.large, color=role("canvas")) {
+ Box {
+ artwork?.let { Image(it,null,Modifier.matchParentSize(),contentScale=ContentScale.Crop,alpha=.25f) }
+ Column(Modifier.fillMaxWidth().padding(VSTheme.inset),verticalArrangement=Arrangement.spacedBy(VSTheme.gap)) {
+ Text(tr("homeUi.title"),style=MaterialTheme.typography.headlineLarge,fontWeight=FontWeight.SemiBold)
+ Text(tr("mobile.local.privacy"),style=MaterialTheme.typography.bodyMedium,color=role("textMuted"))
+ }
+ }
+ }
+ BoxWithConstraints {
+ val columns = if(maxWidth>=600.dp) 2 else 1
+ Column(verticalArrangement=Arrangement.spacedBy(VSTheme.gap)) {
+ destinations.chunked(columns).forEach { group ->
+ Row(horizontalArrangement=Arrangement.spacedBy(VSTheme.gap)) {
+ group.forEach { item -> HomeCard(item,Modifier.weight(1f)) {navigate(item.route)} }
+ }
+ }
+ }
+ }
+ HomeSection("projects.generated_audio") {
+ if(phone.recent.isEmpty()&&host.history.isEmpty()) HomeEmpty("mobile.speak.empty_recent")
+ phone.recent.take(4).forEach { item ->
+ HomeRow(item.text,tr("mobile.local.this_phone"),Icons.Default.PlayArrow,Modifier.testTag("home.audio.${item.id}")) {
+ audioSource="phone";vm.phone.play(item)
+ }
+ }
+ host.history.take(4).forEach {item ->
+ HomeRow(item.text,tr("mobile.local.my_computer"),Icons.Default.PlayArrow) {
+ vm.api?.let {audioSource="computer";vm.play(it.audioPath(item.audioPath))}
+ }
+ }
+ if(audioSource=="phone") phone.audio?.let {LocalAudioPlayer(it,vm::fail)}
+ if(audioSource=="computer") vm.api?.let {api -> host.audio?.let {HostPlayer(api,it,vm::fail)} }
+ }
+ HomeSection("projects.title") {
+ if(phone.dubs.isEmpty()&&host.dubHistory.isEmpty()) HomeEmpty("projects.empty")
+ phone.dubs.take(4).forEach { record ->
+ HomeRow(record.request.title,tr(if(record.checkpoint.done) "mobile.local.this_phone" else record.checkpoint.stage),VSIcons.Video,Modifier.testTag("home.project.${record.request.id}")) {
+ navigate("project/${record.request.id}")
+ }
+ }
+ if(host.dubHistory.isNotEmpty()) HomeRow(tr("mobile.dub.history"),tr("mobile.local.my_computer"),VSIcons.Computer) {navigate("host-dubs")}
+ }
+ HomeSection("clone.saved_profiles") {
+ if(phone.voices.isEmpty()&&host.profiles.isEmpty()) HomeEmpty("mobile.simple.empty_voices")
+ phone.voices.take(4).forEach {voice ->
+ HomeRow(voice.name,tr("mobile.local.this_phone"),Icons.Default.Person) {
+ vm.preference {it.copy(runLocations=it.runLocations+("speak" to "phone"))}
+ navigate("voice/${voice.id}")
+ }
+ }
+ host.profiles.take(4).forEach {voice -> HomeRow(voice.name,tr("mobile.local.my_computer"),Icons.Default.Person) {
+ vm.preference {it.copy(runLocations=it.runLocations+("speak" to "computer"))}
+ navigate("host-voice/"+android.net.Uri.encode(voice.id))
+ } }
+ }
+ }
+ }
+}
+@Composable private fun HomeCard(item: HomeDestination, modifier: Modifier, click: ()->Unit) {
+ Surface(onClick=click,modifier=modifier.testTag("home.${item.route}"),shape=MaterialTheme.shapes.large,
+ color=role(if(item.primary) "surfaceRaised" else "surface"),border=BorderStroke(VSTheme.borderWidth,role("border"))) {
+ Row(Modifier.heightIn(min=if(item.primary) 116.dp else 96.dp).padding(VSTheme.inset),horizontalArrangement=Arrangement.spacedBy(VSTheme.gap),verticalAlignment=Alignment.CenterVertically) {
+ Surface(shape=MaterialTheme.shapes.small,color=role("messageSurface")) {
+ Icon(item.icon,null,Modifier.size(44.dp).padding(10.dp),tint=role("messageAction"))
+ }
+ Column(Modifier.weight(1f),verticalArrangement=Arrangement.spacedBy(VSTheme.gap)) {
+ Text(tr(item.title),style=MaterialTheme.typography.titleMedium,fontWeight=FontWeight.SemiBold)
+ Text(tr(item.detail),style=MaterialTheme.typography.bodyMedium,color=role("textMuted"))
+ }
+ Icon(Icons.AutoMirrored.Filled.ArrowForward,null,tint=role("textMuted"),modifier=Modifier.size(18.dp))
+ }
+ }
+}
+@Composable private fun HomeSection(title: String, content: @Composable ColumnScope.()->Unit) {
+ Column(verticalArrangement=Arrangement.spacedBy(VSTheme.gap)) {
+ Heading(title)
+ Surface(Modifier.fillMaxWidth(),shape=MaterialTheme.shapes.large,color=role("surface"),border=BorderStroke(VSTheme.borderWidth,role("border"))) {
+ Column(Modifier.padding(VSTheme.inset),verticalArrangement=Arrangement.spacedBy(VSTheme.gap),content=content)
+ }
+ }
+}
+@Composable private fun HomeEmpty(key: String) {Text(tr(key),Modifier.padding(vertical=VSTheme.gap),color=role("textMuted"))}
+@Composable private fun HomeRow(title: String, subtitle: String, icon: androidx.compose.ui.graphics.vector.ImageVector, modifier: Modifier=Modifier, click: ()->Unit) {
+ Surface(onClick=click,modifier=modifier.fillMaxWidth(),color=role("surface"),shape=MaterialTheme.shapes.small) {
+ Row(Modifier.heightIn(min=44.dp),horizontalArrangement=Arrangement.spacedBy(VSTheme.gap),verticalAlignment=Alignment.CenterVertically) {
+ Icon(icon,null,Modifier.size(32.dp),tint=role("messageAction"))
+ Column(Modifier.weight(1f)) {
+ Text(title,maxLines=2,overflow=TextOverflow.Ellipsis)
+ Text(subtitle,style=MaterialTheme.typography.bodySmall,color=role("textMuted"))
+ }
+ Icon(Icons.AutoMirrored.Filled.ArrowForward,null,Modifier.size(18.dp),tint=role("textMuted"))
+ }
+ }
+}
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/PhoneStudio.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/PhoneStudio.kt
index 69fe838d6..96e3d1478 100644
--- a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/PhoneStudio.kt
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/PhoneStudio.kt
@@ -35,14 +35,15 @@ class PhoneStudio(context: Context, private val scope: CoroutineScope, private v
} catch(e:CancellationException) {throw e} catch(e:Exception) {mutable.update {it.copy(loading=false)};failure(ClientFailure("mobile.local.catalogue_failed"))}
}}
suspend fun refresh() = withContext(Dispatchers.IO) {
- val phoneVoices=voices.list()
- val recent=history()
- val phoneDubs=dubs.list()
val installed=mutable.value.models.filter(downloads::installed).map {it.id}.toSet()
val used=downloads.usedBytes()
val storage=mutable.value.models.associate {it.id to downloads.usedBytes(it)}
val receipts=mutable.value.models.associate {it.id to licence.history(it)}
- mutable.update {it.copy(installed=installed,used=used,storage=storage,receipts=receipts,voices=phoneVoices,recent=recent,dubs=phoneDubs)}
+ mutable.update {it.copy(installed=installed,used=used,storage=storage,receipts=receipts)}
+ val phoneVoices=voices.list()
+ val recent=history()
+ val phoneDubs=dubs.list()
+ mutable.update {it.copy(voices=phoneVoices,recent=recent,dubs=phoneDubs)}
}
fun download(model: PhoneModel, allowMobile: Boolean) {
if(jobs[model.id]?.isActive==true) return
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/VSIcons.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/VSIcons.kt
index 9e0db4730..201d2d5f2 100644
--- a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/VSIcons.kt
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/VSIcons.kt
@@ -11,6 +11,9 @@ object VSIcons {
private fun symbol(name: String, data: String): ImageVector = ImageVector.Builder(name,24.dp,24.dp,24f,24f)
.addPath(pathData=androidx.compose.ui.graphics.vector.PathParser().parsePathString(data).toNodes(),
fill=SolidColor(Color(VSTheme.roles("default",true).getValue("text"))),pathFillType=androidx.compose.ui.graphics.PathFillType.EvenOdd).build()
+ val Wave by lazy {symbol("Wave","M3 10h2v4H3z M7 6h2v12H7z M11 2h2v20h-2z M15 6h2v12h-2z M19 10h2v4h-2z")}
+ val Computer by lazy {symbol("Computer","M2 3h20v14H2z M4 5v10h16V5z M11 17h2v3h5v2H6v-2h5z")}
+ val Folder by lazy {symbol("Folder","M2 4h8l2 2h10v15H2z M4 8v11h16V8z")}
val Link by lazy {symbol("Link","M3.9 12a4 4 0 0 1 4-4h3V6h-3a6 6 0 0 0 0 12h3v-2h-3a4 4 0 0 1-4-4z M8 11h8v2H8z M13 6h3a6 6 0 0 1 0 12h-3v-2h3a4 4 0 0 0 0-8h-3z")}
val Globe by lazy {symbol("Globe","M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20z M4.3 10h3a17 17 0 0 0 0 4h-3a8 8 0 0 1 0-4z M5.1 8a8 8 0 0 1 4-3.5A15 15 0 0 0 7.7 8z M5.1 16h2.6a15 15 0 0 0 1.4 3.5A8 8 0 0 1 5.1 16z M9.4 10h5.2a15 15 0 0 1 0 4H9.4a15 15 0 0 1 0-4z M9.8 8A13 13 0 0 1 12 4a13 13 0 0 1 2.2 4z M9.8 16h4.4A13 13 0 0 1 12 20a13 13 0 0 1-2.2-4z M16.3 8a15 15 0 0 0-1.4-3.5 8 8 0 0 1 4 3.5z M16.7 10h3a8 8 0 0 1 0 4h-3a17 17 0 0 0 0-4z M16.3 16h2.6a8 8 0 0 1-4 3.5 15 15 0 0 0 1.4-3.5z")}
val Contrast by lazy {symbol("Contrast","M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20z M12 4v16a8 8 0 0 1 0-16z")}
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/connect/ConnectScreen.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/connect/ConnectScreen.kt
index fd0c827a9..e4d9bbd01 100644
--- a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/connect/ConnectScreen.kt
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/connect/ConnectScreen.kt
@@ -9,7 +9,9 @@ import com.voicestudio.mobile.network.PairingAddress
import java.text.DateFormat
import java.util.Date
-@Composable fun ConnectScreen(vm:StudioViewModel) {
+@Composable fun ConnectScreen(vm:StudioViewModel,
+ scanContent: @Composable ((String)->Unit, ()->Unit, (Throwable)->Unit)->Unit = { code,close,error -> QrScanner(code,close,error) }
+) {
val state by vm.state.collectAsState()
val prefs by vm.preferences.collectAsState()
var url by rememberSaveable {mutableStateOf("")}
@@ -22,10 +24,10 @@ import java.util.Date
Screen {
ScreenTitle("mobile.connect.title")
Action("mobile.connect.scan_qr",!state.busy,onClick=camera)
- if(scanner) QrScanner(onCode={raw ->
- try {val address=PairingAddress.parse(raw);url=address.baseUrl.toString();pin=address.pin.orEmpty();scanner=false}
+ if(scanner) scanContent({raw ->
+ try {val address=PairingAddress.parse(raw);url=address.baseUrl.toString();pin=address.pin.orEmpty();scanner=false;manual=true}
catch(e:Exception) {scanner=false;vm.fail(e)}
- },onClose={scanner=false},onError={scanner=false;vm.fail(it)})
+ },{scanner=false},{scanner=false;vm.fail(it)})
Secondary("mobile.simple.address") {manual=!manual}
if(manual) {
Field("mobile.connect.url_label",url,{url=it})
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dictate/DictateScreen.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dictate/DictateScreen.kt
index ccb4110ac..7981d4b44 100644
--- a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dictate/DictateScreen.kt
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dictate/DictateScreen.kt
@@ -53,7 +53,7 @@ import kotlinx.coroutines.CancellationException
ScreenTitle("mobile.tabs.dictate")
if(checking) {Text(tr("common.loading"));LinearProgressIndicator()}
readinessError?.let {error ->
- Text(tr(shortErrorKey(error.key)),color=role("error"),maxLines=1)
+ ErrorMessage(error.key,error.params)
}
if(!checking && readinessError==null && !ready) {
val (key,params)=(readiness ?: Readiness(false)).guidance()
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dub/DubScreen.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dub/DubScreen.kt
index c585ae269..9b4c09011 100644
--- a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dub/DubScreen.kt
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dub/DubScreen.kt
@@ -20,6 +20,7 @@ import com.voicestudio.mobile.designsystem.*
import com.voicestudio.mobile.data.DubWorker
import com.voicestudio.mobile.network.*
import kotlinx.coroutines.*
+import kotlinx.serialization.decodeFromString
import java.io.File
@Composable fun DubScreen(vm:StudioViewModel) {
@@ -27,7 +28,7 @@ import java.io.File
if(location==com.voicestudio.mobile.local.RunLocation.COMPUTER) ComputerDubScreen(vm) else PhoneDubScreen(vm,model)
}
}
-@Composable private fun ComputerDubScreen(vm:StudioViewModel) {
+@Composable fun ComputerDubScreen(vm:StudioViewModel) {
val context=LocalContext.current
val state by vm.state.collectAsState()
val work=remember {WorkManager.getInstance(context)}
@@ -139,7 +140,10 @@ import java.io.File
Group {Column(Modifier.fillMaxWidth().padding(VSTheme.inset),verticalArrangement=Arrangement.spacedBy(VSTheme.gap)) {
val value=if(info.state==WorkInfo.State.SUCCEEDED) 100 else info.progress.getInt("percent",0)
Row(Modifier.fillMaxWidth(),verticalAlignment=Alignment.CenterVertically) {
- Text(tr(if(stage.contains("stage_")) stage else shortErrorKey(stage)),Modifier.weight(1f),maxLines=1,overflow=TextOverflow.Ellipsis)
+ if(info.state==WorkInfo.State.FAILED) {
+ val params=runCatching {kotlinx.serialization.json.Json.decodeFromString<Map<String,String>>(info.outputData.getString("error_params") ?: "{}")}.getOrDefault(emptyMap())
+ ErrorMessage(stage,params,Modifier.weight(1f))
+ } else Text(tr(stage),Modifier.weight(1f),maxLines=1,overflow=TextOverflow.Ellipsis)
Text(tr("mobile.simple.percent",mapOf("percent" to value)))
}
if(!info.state.isFinished) {
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dub/PhoneDubScreen.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dub/PhoneDubScreen.kt
index aabf3d5dc..beda3e3cf 100644
--- a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dub/PhoneDubScreen.kt
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dub/PhoneDubScreen.kt
@@ -21,7 +21,12 @@ import com.voicestudio.mobile.local.*
import kotlinx.coroutines.*
import java.io.File
-@Composable internal fun PhoneDubScreen(vm: StudioViewModel,clone: PhoneModel?) {
+@Composable fun PhoneProjectScreen(vm: StudioViewModel, projectId: String? = null) {
+ val phone by vm.phone.state.collectAsState()
+ PhoneDubScreen(vm,phone.models.firstOrNull {it.capability=="clone"},projectId,libraryOnly=true)
+}
+
+@Composable internal fun PhoneDubScreen(vm: StudioViewModel,clone: PhoneModel?, projectId: String? = null, libraryOnly: Boolean = false) {
val context=LocalContext.current
val phone by vm.phone.state.collectAsState()
val prefs by vm.preferences.collectAsState()
@@ -67,7 +72,8 @@ import java.io.File
}
}
Screen {
- ScreenTitle("mobile.tabs.dub")
+ ScreenTitle(if(libraryOnly) "projects.title" else "mobile.tabs.dub")
+ if(projectId==null && !libraryOnly) {
StepHeading("mobile.simple.source",VSIcons.Video)
Secondary("mobile.dub.pick_media",!copying&&!state.busy) {picker.launch(arrayOf("audio/*","video/*"))}
path?.let {source ->SelectedDubSource(sourceName ?: File(source).name) {File(source).delete();path=null;sourceName=null}}
@@ -103,7 +109,8 @@ import java.io.File
vm.phone.refreshDubs()
}
}
- phone.dubs.filterNot {it.checkpoint.done}.forEach {record ->
+ }
+ phone.dubs.filter {projectId==null || it.request.id==projectId}.filterNot {it.checkpoint.done}.forEach {record ->
val active=works.firstOrNull {"phone-dub:${record.request.id}" in it.tags&&!it.state.isFinished}
val percent=active?.progress?.getInt("percent",record.checkpoint.percent) ?: record.checkpoint.percent
val stage=active?.progress?.getString("stage") ?: record.checkpoint.stage
@@ -111,7 +118,9 @@ import java.io.File
Column(Modifier.fillMaxWidth().padding(VSTheme.inset),verticalArrangement=Arrangement.spacedBy(VSTheme.gap)) {
Text(record.request.title,maxLines=1,overflow=TextOverflow.Ellipsis)
Row(Modifier.fillMaxWidth(),verticalAlignment=Alignment.CenterVertically) {
- Text(tr(if(stage.contains("stage_")||stage in setOf("mobile.simple.mixing","mobile.simple.exporting","mobile.simple.cancelled")) stage else shortErrorKey(stage)),Modifier.weight(1f),maxLines=1,overflow=TextOverflow.Ellipsis)
+ if(stage.contains("stage_")||stage in setOf("mobile.simple.mixing","mobile.simple.exporting","mobile.simple.cancelled"))
+ Text(tr(stage),Modifier.weight(1f),maxLines=1,overflow=TextOverflow.Ellipsis)
+ else ErrorMessage(stage,record.checkpoint.errorParams,Modifier.weight(1f))
Text(tr("mobile.simple.percent",mapOf("percent" to percent)))
}
LinearProgressIndicator(progress={percent/100f},modifier=Modifier.fillMaxWidth())
@@ -124,8 +133,8 @@ import java.io.File
}
}
Heading("mobile.dub.history")
- if(phone.dubs.none {it.checkpoint.outputs.isNotEmpty()}) EmptyState("mobile.simple.empty_dubs")
- phone.dubs.forEach {record ->record.checkpoint.outputs.forEach {output ->
+ if(phone.dubs.filter {projectId==null || it.request.id==projectId}.none {it.checkpoint.outputs.isNotEmpty()}) EmptyState("mobile.simple.empty_dubs")
+ phone.dubs.filter {projectId==null || it.request.id==projectId}.forEach {record ->record.checkpoint.outputs.forEach {output ->
val file=vm.phone.dubs.file(record.request.id,output.file)
Row(Modifier.fillMaxWidth(),verticalAlignment=Alignment.CenterVertically) {
Column(Modifier.weight(1f)) {
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/models/ModelsScreen.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/models/ModelsScreen.kt
index 1513e7720..5dc0880f4 100644
--- a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/models/ModelsScreen.kt
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/models/ModelsScreen.kt
@@ -56,7 +56,7 @@ import com.voicestudio.mobile.local.*
LinearProgressIndicator(progress={if(p.total>0) (p.received.toFloat()/p.total).coerceIn(0f,1f) else 0f},modifier=Modifier.fillMaxWidth())
Text(tr("mobile.local.transfer",mapOf("received" to Formatter.formatFileSize(context,p.received),"total" to Formatter.formatFileSize(context,p.total))))
}
- p.error?.let {Text(tr(shortErrorKey(it)),color=role("error"),maxLines=1)}
+ p.error?.let {ErrorMessage(it,mapOf("ram" to model.minRamGb))}
}
if(downloading) Secondary("common.cancel") {vm.phone.cancelDownload(model)}
else if(!installed) Secondary("mobile.local.download",fits) {
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/speak/SpeakScreen.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/speak/SpeakScreen.kt
index 3305373b9..0e3be511b 100644
--- a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/speak/SpeakScreen.kt
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/speak/SpeakScreen.kt
@@ -16,12 +16,12 @@ import com.voicestudio.mobile.features.*
import java.io.File
import kotlinx.coroutines.*
-@Composable private fun ComputerSpeakScreen(vm:StudioViewModel) {
+@Composable private fun ComputerSpeakScreen(vm:StudioViewModel, initialVoiceID: String? = null) {
val state by vm.state.collectAsState()
val context=LocalContext.current
val scope=rememberCoroutineScope()
var text by rememberSaveable {mutableStateOf("")}
- var voice by rememberSaveable {mutableStateOf("")}
+ var voice by rememberSaveable(initialVoiceID) {mutableStateOf(initialVoiceID.orEmpty())}
var engine by rememberSaveable {mutableStateOf("")}
var language by rememberSaveable {mutableStateOf("Auto")}
val catalog=rememberLanguageCatalog(vm::fail)
@@ -79,15 +79,15 @@ import kotlinx.coroutines.*
}
}
-@Composable fun SpeakScreen(vm: StudioViewModel) {
+@Composable fun SpeakScreen(vm: StudioViewModel, initialPhoneVoiceID: String? = null, initialComputerVoiceID: String? = null) {
com.voicestudio.mobile.features.models.TaskLocation(vm,"speak",setOf("tts","clone")) {location,model ->
- if(location==com.voicestudio.mobile.local.RunLocation.COMPUTER) ComputerSpeakScreen(vm)
+ if(location==com.voicestudio.mobile.local.RunLocation.COMPUTER) ComputerSpeakScreen(vm,initialComputerVoiceID)
else {
val phone by vm.phone.state.collectAsState()
val context=LocalContext.current
val scope=rememberCoroutineScope()
var text by rememberSaveable {mutableStateOf("")}
- var speaker by rememberSaveable {mutableStateOf("0")}
+ var speaker by rememberSaveable(initialPhoneVoiceID) {mutableStateOf(initialPhoneVoiceID?.let {"phone:"+it} ?: "0")}
val voice=phone.voices.firstOrNull {"phone:"+it.id==speaker}
val capability=if(voice==null) "tts" else "clone"
val selected=model?.takeIf {it.capability==capability} ?: phone.models.firstOrNull {it.capability==capability&&it.id in phone.installed} ?: phone.models.firstOrNull {it.capability==capability}
@@ -104,6 +104,8 @@ import kotlinx.coroutines.*
ScreenTitle("mobile.tabs.speak")
Field("mobile.speak.placeholder",text,{text=it},multiline=true)
val speakers=selected?.option("num_speakers",selected.option("speaker_count","1"))?.toIntOrNull()?.coerceIn(1,128) ?: 1
+ val validSpeaker=voice!=null||speaker.toIntOrNull()?.let {it in 0 until speakers}==true
+ LaunchedEffect(selected?.id,speakers) {if(voice==null&&!validSpeaker) speaker="0"}
var language by rememberSaveable {mutableStateOf("en")}
LaunchedEffect(selected?.id,voice?.id) {language=if(voice!=null) "auto" else language.takeIf {it in selected?.languages.orEmpty()} ?: selected?.languages?.firstOrNull().orEmpty()}
val languageChoices=if(voice!=null) listOf(Choice("auto",tr("languagePicker.auto"))) else selected?.languages.orEmpty().map {Choice(it,languageName(it,LocalL10n.current.locale))}
@@ -113,7 +115,7 @@ import kotlinx.coroutines.*
Box(Modifier.weight(1f)) {ChoicePicker("mobile.speak.language",language,languageChoices,compact=true) {language=it}}
}
if(selected?.let {!phone.canRun(it,vm.phone.ramBytes)}!=false) selected?.let {com.voicestudio.mobile.features.models.MissingModelsCard(vm,"mobile.tabs.speak",listOf(it))}
- else Action("mobile.speak.generate",text.isNotBlank()&&selected!=null&&phone.progress==null) {vm.phone.speak(selected!!,text,speaker.toIntOrNull() ?: 0,voice,language.takeUnless {it=="auto"})}
+ else Action("mobile.speak.generate",text.isNotBlank()&&selected!=null&&validSpeaker&&phone.progress==null) {vm.phone.speak(selected!!,text,speaker.toIntOrNull() ?: 0,voice,language.takeUnless {it=="auto"})}
phone.progress?.let {p ->
LinearProgressIndicator(progress={p},modifier=Modifier.fillMaxWidth())
Secondary("common.cancel") {vm.phone.cancelInference()}
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/voices/VoicesScreen.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/voices/VoicesScreen.kt
index 96d92849f..d8707adc2 100644
--- a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/voices/VoicesScreen.kt
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/voices/VoicesScreen.kt
@@ -55,7 +55,7 @@ import java.io.File
}
LaunchedEffect(recording) {seconds=0;while(recording) {
delay(1000);seconds++
- if(seconds>=30) {try {sample=recorder.stop().absolutePath} catch(e:Exception) {sample=null;vm.fail(e)} finally {recording=false}}
+ if(seconds>=29) {try {sample=recorder.stop().absolutePath} catch(e:Exception) {sample=null;vm.fail(e)} finally {recording=false}}
}}
val record=permissionAction(Manifest.permission.RECORD_AUDIO,"mobile.permissions.microphone",vm::fail) {
try {sample?.let {File(it).delete()};sample=recorder.start().absolutePath;recording=true} catch(e:Exception) {vm.fail(e)}
diff --git a/mobile/contract/SPEC.md b/mobile/contract/SPEC.md
index 0c93b4a7d..9d57813cf 100644
--- a/mobile/contract/SPEC.md
+++ b/mobile/contract/SPEC.md
@@ -60,7 +60,18 @@ no accounts. M1 (below) is the computer connection; M2 is on-device inference.
## Screens (M1)
-Bottom navigation: **Speak**, **Voices**, **Dub**, **Dictate**, **Settings**.
+Bottom navigation: **Home**, **Voices**, **Dub**, **Dictate**, **Settings**.
+Home is the default after consent. It adapts Electron's dashboard with the same
+bundled `electron/public/signal-field.webp` artwork, generated palettes, Inter,
+card hierarchy, recent generated audio, recent dubbing projects and saved voices.
+Its six working shortcuts open Speak, voice cloning, Dub, Dictate, Models and
+Connect. Speak stays reachable from Home; it is not a sixth bottom tab. Recent
+phone audio plays locally, saved phone voices open Speak with that reference
+selected, and project rows open that project's outputs/resume controls. Computer
+libraries are shown only from the paired host. Empty sections use localized
+empty states; Home never starts downloads or external requests on its own.
+Desktop-only workspaces (voice design, stories, audiobooks, galleries and tools)
+are not represented as nonfunctional mobile shortcuts.
All tabs work without pairing once on-device models are installed (see M2); the Connect flow is reachable from first run and from Settings.
1. **First run**
diff --git a/mobile/ios/README.md b/mobile/ios/README.md
index 39643beba..023cf6353 100644
--- a/mobile/ios/README.md
+++ b/mobile/ios/README.md
@@ -52,13 +52,13 @@ Choose an installed simulator name. The native build verifies pinned artifacts,
## Phone inference and models
-`VoiceStudioKit/LocalEngine` is the single feature-facing interface: synthesize, clone, transcribe, streamTranscribe and translate. C runtime handles remain on detached workers; an atomic cancellation token crosses tasks. TTS uses sherpa Kitten/Kokoro, offline ASR uses Whisper, and streaming ASR uses the catalogue's Zipformer family. Streaming preserves endpoint finals, produces a final session transcript and rejects sample-rate changes. Whisper handles long input in 20-second windows while reusing the recognizer. Its native decode has no abort callback: cancellation is checked between windows and the current decode must return before cleanup. TTS and OmniVoice cancel through their native callbacks; llama checks between tokens and through its CPU abort callback. Progress reports loading/running/finished; native APIs without fractional callbacks remain indeterminate during the current step. Every locally generated WAV passes `markSynthetic`, which adds a synthetic-audio INFO comment.
+`VoiceStudioKit/LocalEngine` is the single feature-facing interface: synthesize, clone, transcribe, streamTranscribe and translate. C runtime handles remain on detached workers; an atomic cancellation token crosses tasks. The process-wide native permit and model file lease remain owned by that worker until native cleanup finishes, including after cancellation and for streaming. TTS uses sherpa Kitten/Kokoro, offline ASR uses Whisper, and streaming ASR uses the catalogue's Zipformer family. Streaming preserves endpoint finals, produces a final session transcript and rejects sample-rate changes. Whisper handles long input in 20-second windows while reusing the recognizer. Its native decode has no abort callback: cancellation is checked between windows and the current decode must return before cleanup. TTS and OmniVoice cancel through their native callbacks; llama checks between tokens and through its CPU abort callback. Progress reports loading/running/finished; native APIs without fractional callbacks remain indeterminate during the current step. Every locally generated WAV passes `markSynthetic`, which adds a synthetic-audio INFO comment.
Speak, clone, Dictate and Dub remember independent This phone / Computer choices. Without a choice, a compatible installed and accepted phone model wins; otherwise a paired computer wins; otherwise a compact download card offers Get and links to Models. A remembered computer choice falls back to the phone or Models prompt while unpaired, matching Android, and applies again after pairing. Speak offers three compact pickers (voice, model, language), a text box, Generate and the existing playback, waveform, seeking, sharing and saving controls. Its phone voice picker includes presets and saved references; reference voices select OmniVoice rather than preset TTS. Phone generations persist locally and can be played or deleted in Recent. Dictate captures mono PCM16 at 16 kHz and sends it directly to `LocalEngine` on the phone route. Neither phone path requires a computer or makes a network request.
Models decodes the generated `mobile/contract/models.json`, bundled at build time alongside the locale catalogs. Unknown fields are ignored. Missing or blank product names, invalid revisions, hashes, unsafe file paths, sizes, duplicate IDs and runtime/capability mismatches are rejected. Cards show product name, size, localized capability and one Download/Cancel/Delete action. Feature screens and model cards hide IDs, repository names and licence codes; licence details are in the acceptance sheet. Languages, licence terms and per-model storage are in the licence sheet. Unsupported RAM requirements stay visible with an explanation and cannot download or load. Models has Download, Cancel, Delete, a total storage counter and an explicit mobile-data toggle.
-Downloads start only from a user action. Four-MiB HTTP ranges persist across cancellation and relaunch; servers ignoring ranges can return a complete file. Hugging Face is attempted first, then hf-mirror.com. A dedicated cookie/credential-free session permits only HTTPS HF/mirror delivery domains (including signed HF CDN redirects); host credentials and referrers are never forwarded. Wi-Fi-only is enforced by both the local path check and URLSession's cellular/expensive-network policy unless mobile data was allowed. Files stay under private Application Support, excluded from backup. Each file is size/SHA-256 verified before installation and hashed again before native loading. Active leases prevent delete/replacement during inference. Downloads interrupted by suspension resume from persisted ranges when the user starts them again; continuous background model downloading is not promised.
+Downloads start only from a user action. Four-MiB HTTP ranges persist across cancellation and relaunch; servers ignoring ranges can return a complete file. Hugging Face is attempted first, then hf-mirror.com. A dedicated cookie/credential-free session permits only HTTPS HF/mirror delivery domains (including signed HF CDN redirects); host credentials and referrers are never forwarded. Wi-Fi-only is enforced by both the local path check and URLSession's cellular/expensive-network policy unless mobile data was allowed. Files stay under private Application Support, excluded from backup. Each file is size/SHA-256 verified before installation. Native loads reuse per-file verification stamps containing size, modification time and catalogue identity; changed stamps or a native failure force fresh hashing. A relaunch verifies files on their first load. Resume checks storage only for bytes still needed in the current file, skipping verified completed files. Active leases prevent delete/replacement during inference. Downloads interrupted by suspension resume from persisted ranges when the user starts them again; continuous background model downloading is not promised.
Every non-commercial, conditional, unidentified or explicitly gated model requires acceptance before download and load. The phone shows all supplied licence metadata and full catalogue terms, records the supplied terms fingerprint, actual app version and time, and retains the latest 20 actions locally. Changed terms block loading again; withdrawal immediately blocks new use and downloads. Acceptance is independent of the computer. Delete removes weights and partial files, preserving licence history.
@@ -66,11 +66,11 @@ OmniVoice's `tokenizer` role is its audio codec. The clone adapter takes mono 24
## Phone voices and dubbing
-Voices lists phone and computer voices together, with initials, a location badge, preview and rename/delete actions. The toolbar plus opens cloning: name, consent, record or pick a sample, Create clone. The consent details are behind an info button. Phone creation requires a downloaded, accepted Whisper model; it extracts mono 24-kHz reference audio (0.1–30 seconds), transcribes it and atomically publishes reference PCM/WAV plus transcript, creation time and consent time in private, backup-excluded storage. Empty speech and cancelled creation never publish a voice. Recording stops at 30 seconds. OmniVoice must be downloaded and accepted before Speak can synthesize with that reference. Renaming/deleting a phone voice never changes a computer voice.
+Voices lists phone and computer voices together, with initials, a location badge, preview and rename/delete actions. The toolbar plus opens cloning: name, consent, record or pick a sample, Create clone. The consent details are behind an info button. Phone creation requires a downloaded, accepted Whisper model; it extracts mono 24-kHz reference audio (0.1–30 seconds), transcribes it and atomically publishes reference PCM/WAV plus transcript, creation time and consent time in private, backup-excluded storage. Empty speech and cancelled creation never publish a voice. Recording stops natively at 29 seconds, keeping the sample within the 30-second cloning limit even if UI timers are delayed. Decoding caps accepted duration-rounding tolerance to exactly 30 seconds. OmniVoice must be downloaded and accepted before Speak can synthesize with that reference. Renaming/deleting a phone voice never changes a computer voice.
Phone Dub follows Source → Languages → Voice. Pick a local audio/video file, choose up to 20 target languages and either the original speaker or a saved phone voice, give voice permission and tap Dub. More contains model choices and audio-only export. Pasted links remain a computer workflow: phone processing never fetches media from a URL. The three required models (Whisper, Qwen translation and OmniVoice) must be installed, fit the device and have current licence acceptance.
-Extraction uses AVAssetReader with 24-kHz mono PCM, preserving gaps and soundtrack offsets. Uncompressed audio files use AVAudioFile/AVAudioConverter to stream and resample directly without a media-reader service. A disk-backed pipeline bounds native ASR input to 20 seconds; sherpa token timestamps define each window's speech envelope (falling back to the window duration when unavailable), matching Android. Each segment is translated with the catalogue prompt and cloned from at most eight seconds cut from the source; the reference clip gets its own matching ASR transcript. A chosen saved voice supplies its reference and transcript instead. Short speech is padded, long speech is compressed by waveform overlap-add, segments are mixed at their timestamps and clipped to the original duration. Tiny windows use interpolation. WAV output passes `markSynthetic`; video uses AVAssetWriter to retain the original video/rotation and replace the soundtrack with AAC, with synthetic provenance in MP4 metadata. The original music is not retained as a separate stem.
+Extraction uses AVAssetReader with 24-kHz mono PCM, preserving gaps and soundtrack offsets. Uncompressed audio files use AVAudioFile/AVAudioConverter to stream and resample directly without a media-reader service. A disk-backed pipeline bounds native ASR input to 20 seconds; sherpa token timestamps define each window's speech envelope (falling back to the window duration when unavailable), matching Android. Each segment is translated with the catalogue prompt and cloned from at most eight seconds cut from the source; the reference clip gets its own matching ASR transcript, falling back to the segment transcript if the clip is quiet. Empty saved reference transcripts are repaired during resume. A chosen saved voice supplies its reference and transcript instead. Short speech is padded, long speech is compressed by waveform overlap-add, segments are mixed at their timestamps and clipped to the original duration. Tiny windows use interpolation. WAV output passes `markSynthetic`; video uses AVAssetWriter to retain the original video/rotation and replace the soundtrack with AAC, with synthetic provenance in MP4 metadata. The original music is not retained as a separate stem.
Progress cards show stage, percent and Cancel. Backgrounding cancels ongoing work; Whisper's current native decode must finish before cancellation returns. Sources, exact model identities (including terms/configuration), original PCM, segment translations, reference transcripts, render hashes and outputs are checkpointed atomically under private storage. Resume on a pending card continues after interruption/relaunch without translating or mixing completed segments twice. Corrupt cached renders are rebuilt; corrupt completed outputs and changed catalogue identities are blocked. Licence permission is rechecked between stages and by each native load. Multiple target outputs commit separately. Phone history plays video/audio, shares, saves via the system document picker and deletes completed jobs. Completed phone dubs use the same opt-in local notifications setting as computer dubs. Pending jobs can also be deleted when idle. Deleting a job removes its source, checkpoints and outputs; files are retained until explicit deletion. Media is bounded to four hours, references to 30 seconds, and ASR state to 10,000 segments.
@@ -90,12 +90,47 @@ Background URLSession persists computer uploads and completion receipts through
Theme roles are generated from Electron; never edit `Tokens.generated.swift`. The maintainer regenerates shared inputs with `bun scripts/export-mobile-tokens.ts`, `uv run python scripts/export_openapi.py` and `uv run python scripts/export_mobile_models.py`. These affect both platforms and are not iOS build steps. Resource preparation copies the actual Electron catalogs, shared/platform mobile additions, desktop language catalog and models catalogue. On-device screens use the canonical `mobile/contract/strings.mobile.en.json` keys; iOS needs no platform additions. Active-work errors reuse the desktop wait message. The microphone permission prompt combines the desktop microphone reason with the shared phone/computer privacy notice. Licence codes, categories, credits, terms and fingerprints appear only in the licence sheet, matching Android. Localization supports interpolation, plurals, language/English fallback and Chinese script/region selection. Package checks cover source key availability and reject platform overrides of shared strings.
-Settings, appearance and language work without pairing. Permissions are requested at first use. No analytics SDK, push service, Bonjour discovery, account or crash reporter is linked; analytics consent records only a local preference. On-device tasks send nothing; networking is limited to explicitly started model downloads and paired-host requests. Inter and the app/runtime licences are shown under About. All colors come from theme tokens; controls use Dynamic Type, minimum 44-point targets, scrollable layouts and localized accessibility labels.
+Settings, appearance and language work without pairing. Permissions are requested at first use. No analytics SDK, push service, Bonjour discovery, account or crash reporter is linked; analytics consent records only a local preference. On-device tasks send nothing; networking is limited to explicitly started model downloads and paired-host requests. Inter and the app/runtime licences are shown under About. Runtime notices include eSpeak NG (GPL-3.0) with pinned corresponding-source references, piper-phonemize, kaldi-native-fbank/KissFFT, kaldi-decoder/kaldifst/OpenFST/Eigen, simple-sentencepiece, JSON, hclust-cpp, ONNX Runtime, sherpa-onnx, OmniVoice and both ggml copies, and llama.cpp. These checked-in legal texts are bundled even without a local native build; resource checks verify their manifest and runtime pins. Compact error banners and Connect show a short heading plus the specific localized cause/recovery instruction. Corrupt voice, generation and dub records are skipped individually; model readiness refreshes independently. All colors come from theme tokens; controls use Dynamic Type, minimum 44-point targets, scrollable layouts and localized accessibility labels.
## Verification limits and interpretations
-Verified with CLT: the strict Swift 6 package suite, macOS platform-wrapper type-checks, resource generation, XcodeGen generation and app/UI-test syntax parsing. Separate opt-in runs exercise all three actual native libraries, Kitten/Whisper/Zipformer inference, phone reference creation and cloned Speak, and the complete audio dub workflow with native translation/cloning and checkpoint reuse. The complete native dub smoke currently fails its French-output assertion on a misrecognized tiny Whisper transcript; audio export and checkpoint reuse pass. Clean English translation, voice creation and cloned Speak pass. The tiny Zipformer recognizes the ending phrase of the synthetic smoke sentence; this is an inference check, not a transcription-accuracy claim.
+To exercise the linked iOS frameworks (including Metal), boot an isolated simulator,
+provision the test models as above, then run with full Xcode selected:
-`VoiceStudioUITests/PhoneScreens.swift` covers unpaired screens, compact download cards, product names, licence consent, picker selection, dictation action placement and collapsed details; `ScreenshotTour` captures phone and computer screens plus palette/language pickers as retained Xcode test attachments. These tests are authored, not run on this CLT-only host. The iOS xcframework build/link, SwiftUI compilation, simulator UI tests, physical-device model RAM/thermal behavior, download/cellular transitions, microphone/local-network/QR permissions, VoiceOver/largest Dynamic Type, signing, background uploads and real-host end-to-end workflows require full Xcode/device validation. macOS inference does not prove iOS execution.
+```sh
+python3 mobile/ios/scripts/simulator-inference.py --device SIMULATOR_UDID
+```
-Contract interpretations: Get starts a queue with separate per-model acceptance; declining or dismissing stops the unstarted remainder while already authorized transfers continue. The compact card links to Models through its label. The optional catalogue `licence.terms` contains the full disclosure and is displayed when supplied; the fingerprint remains catalogue-authoritative. HF's signed delivery CDNs are allowed only within its HF-owned delivery domains, because normal model resolve URLs redirect there. Downloads resume at verified range boundaries rather than URLSession opaque resume blobs. The pinned llama prebuilt lacks a simulator slice, so that slice is built from the same pinned source. Missing transitive SHA-256 fields in shared pins are documented in the native README. For dubbing, “segments + timestamps” means one timed speech envelope per bounded Whisper window, matching Android; it does not imply diarization. A remembered computer route falls back while unpaired because its segmented control is hidden. A cancelled dub stays resumable; deletion is explicit. iOS background resume is a user-started Resume after foregrounding, not guaranteed background compute. Video mux and compressed-source extraction need full Xcode/device validation; macOS audio tests exercise the real uncompressed-file conversion and export paths.
+The `VoiceStudioNative` scheme hosts the package tests inside the app. The script
+runs runtime loading, video encoding/muxing, speech/recognition, cloning/translation,
+saved phone voices and resumable dubbing sequentially, and rejects skipped or empty
+test results. It never downloads models or accepts licences. `--test NAME` selects
+one workflow; result bundles remain under the selected derived-data directory.
+Simulator fixtures use the checkout's cached models; this is not a physical-device
+test harness. The video regression verifies rotation, duration, playable AAC and
+the synthetic-audio metadata using the platform's real encoder and decoder.
+
+All six linked-framework workflows pass on iOS 27.1 with zero skips: native loading,
+video export, Kitten/Whisper/Zipformer inference and cancellation, OmniVoice cloning
+with French translation, persisted phone voices and cloned Speak, and complete
+audio dubbing with checkpoint reuse. OmniVoice executes on Metal; llama reports zero offloaded GPU
+layers and uses its CPU path in this simulator run. These results are separate from the macOS
+inference runs below and do not establish physical-phone memory or thermal limits.
+
+Local validation on 2026-10-18 passes the Swift 6 package suite (optional inference tests run separately), resource checks, pinned iOS xcframework builds, SwiftUI compilation, the simulator app build, and the unsigned iPhone Release build. Shared contract, theme-token and contact-email checks also pass. Separate opt-in runs exercise all three actual native libraries, Kitten/Whisper/Zipformer inference, phone reference creation and cloned Speak, and the complete audio dub workflow with native translation/cloning and checkpoint reuse. The complete native audio dub smoke passes its French-output, marked export and checkpoint-reuse assertions. Standalone translation, voice creation and cloned Speak pass. The tiny Whisper model can misrecognize the short synthetic source; these tests verify execution and pipeline completion rather than transcription accuracy. The tiny Zipformer recognizes the ending phrase of the synthetic smoke sentence; this is an inference check, not a transcription-accuracy claim.
+
+`VoiceStudioUITests/PhoneScreens.swift` covers unpaired screens, compact download cards, product names, licence consent, picker selection, dictation action placement and collapsed details; `ScreenshotTour` captures phone and computer screens plus palette/language pickers as retained Xcode test attachments. All 16 UI scenarios pass in one full run on the iPhone Duo simulator with iOS 27.1, including Home navigation and dark/light screenshots. The tests cover consent, optional pairing, generation/playback, phone download and licence gates, voice/dub screens, keyboard handling, search, and theme selection. They support both bottom tabs and adaptive side navigation. Download cards preserve separate accessibility identities for opening Models and starting a download. Physical-device model RAM/thermal behavior, download/cellular transitions, microphone/local-network/QR permissions, VoiceOver/largest Dynamic Type, signing, background uploads and real-host end-to-end workflows still require device validation. macOS inference does not prove iOS execution.
+
+Contract interpretations: Get starts a queue with separate per-model acceptance; declining or dismissing stops the unstarted remainder while already authorized transfers continue. The compact card links to Models through its label. The optional catalogue `licence.terms` contains the full disclosure and is displayed when supplied; the fingerprint remains catalogue-authoritative. HF's signed delivery CDNs are allowed only within its HF-owned delivery domains, because normal model resolve URLs redirect there. Downloads resume at verified range boundaries rather than URLSession opaque resume blobs. The pinned llama prebuilt lacks a simulator slice, so that slice is built from the same pinned source. Missing transitive SHA-256 fields in shared pins are documented in the native README. For dubbing, “segments + timestamps” means one timed speech envelope per bounded Whisper window, matching Android; it does not imply diarization. A remembered computer route falls back while unpaired because its segmented control is hidden. A cancelled dub stays resumable; deletion is explicit. iOS background resume is a user-started Resume after foregrounding, not guaranteed background compute. The real iOS video regression verifies AVC/AAC muxing and compressed-source extraction; physical-device codec behavior remains a separate check.
+
+## Electron-style mobile Home
+
+Home is the first workspace after consent, using Electron's bundled signal-field
+artwork, shared palette roles, Inter and card hierarchy. Speak, cloning, dubbing,
+dictation, models and computer pairing have working shortcut cards. Generated
+audio, saved voices and recent dubbing projects come from the actual phone
+libraries, with paired-computer entries alongside them. Audio opens its player,
+saved phone voices select the reference in Speak, and projects open their
+outputs and resume controls. Empty states are localized and downloads remain
+explicit. Home replaces Speak in the five-item navigation; Speak opens from Home.
+Desktop-only workspaces are not advertised as available mobile features.
diff --git a/mobile/ios/VoiceStudio/App/ThemeUI.swift b/mobile/ios/VoiceStudio/App/ThemeUI.swift
index 98ccbeaa3..8313a7b1c 100644
--- a/mobile/ios/VoiceStudio/App/ThemeUI.swift
+++ b/mobile/ios/VoiceStudio/App/ThemeUI.swift
@@ -80,7 +80,7 @@ struct RootView: View {
if !model.consentAnswered { ConsentView() }
else {
TabView {
- NavigationStack { SpeakView() }.tabItem { Label(model.t("mobile.tabs.speak"), systemImage: "waveform") }
+ NavigationStack { HomeView() }.tabItem { Label(model.t("nav.home"), systemImage: "house") }
NavigationStack { VoicesView() }.tabItem { Label(model.t("mobile.tabs.voices"), systemImage: "person.wave.2") }
NavigationStack { DubView() }.tabItem { Label(model.t("mobile.tabs.dub"), systemImage: "film") }
NavigationStack { DictateView() }.tabItem { Label(model.t("mobile.tabs.dictate"), systemImage: "mic") }
@@ -110,7 +110,7 @@ struct RootView: View {
.safeAreaInset(edge: .top) {
if let error = model.error ?? model.phone.error {
HStack(spacing: VSTokens.spacingGap) {
- Text(model.t(shortError(error))).foregroundStyle(theme.color("error")).lineLimit(1)
+ ErrorNotice(error: error).foregroundStyle(theme.color("error"))
.frame(maxWidth: .infinity,alignment: .leading)
if error.key.hasPrefix("mobile.local.") {
Button(model.t("mobile.simple.download_models")) { model.error = nil; model.phone.error = nil; recovery = "models" }
@@ -133,18 +133,20 @@ struct RootView: View {
}
}
- private func shortError(_ error: ClientError) -> String {
- if error.key.hasPrefix("mobile.simple.") { return error.key }
- if error.key.hasPrefix("mobile.local.") { return "mobile.simple.models_error" }
- if error.key.contains("offline") || error.key.contains("connection") { return "mobile.simple.connection_error" }
- if error.key == "mobile.simple.no_speech" { return error.key }
- if error.key.contains("file") || error.key.contains("media") { return "mobile.simple.media_failed" }
- if error.key.contains("clone") { return "mobile.simple.clone_failed" }
- if error.key.contains("dub") { return "mobile.simple.dub_failed" }
- return "mobile.simple.error"
- }
}
+struct ErrorNotice: View {
+ @Environment(AppModel.self) private var model
+ let error: ClientError
+ var titleKey: String?
+ var body: some View {
+ let message = ErrorPresentation(error,l10n: model.l10n,titleKey: titleKey)
+ VStack(alignment: .leading,spacing: 2) {
+ Text(message.title)
+ if let detail = message.detail { Text(detail).font(.footnote) }
+ }.fixedSize(horizontal: false,vertical: true)
+ }
+}
struct ConsentView: View {
@Environment(AppModel.self) private var model
var body: some View {
diff --git a/mobile/ios/VoiceStudio/Features/ConnectView.swift b/mobile/ios/VoiceStudio/Features/ConnectView.swift
index f43d0588a..9530a816d 100644
--- a/mobile/ios/VoiceStudio/Features/ConnectView.swift
+++ b/mobile/ios/VoiceStudio/Features/ConnectView.swift
@@ -23,8 +23,8 @@ struct ConnectView: View {
.buttonStyle(VSButtonStyle(kind: .secondary)).disabled(model.connection.connecting || model.busy || BackgroundUpload.shared.pending != nil || url.isEmpty).accessibilityIdentifier("connect.submit")
}
}
- if model.connection.error != nil {
- Text(model.t("mobile.simple.connection_error"))
+ if let error = model.connection.error {
+ ErrorNotice(error: error,titleKey: "mobile.simple.connection_error")
Button(model.t("mobile.simple.retry")) { Task { await connect() } }
}
if !model.connection.hosts.isEmpty { Text(model.t("mobile.connect.saved_hosts")) }
diff --git a/mobile/ios/VoiceStudio/Features/HomeView.swift b/mobile/ios/VoiceStudio/Features/HomeView.swift
new file mode 100644
index 000000000..1622bb7f9
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Features/HomeView.swift
@@ -0,0 +1,116 @@
+import SwiftUI
+import VoiceStudioKit
+
+/// Electron's dashboard hierarchy, backed by the phone's real libraries.
+struct HomeView: View {
+ @Environment(AppModel.self) private var model
+ @Environment(\.vsTheme) private var theme
+ @State private var player = AudioPlayer()
+ var body: some View {
+ Page {
+ VStack(alignment: .leading, spacing: VSTokens.spacingGap * 2) {
+ VStack(alignment: .leading, spacing: VSTokens.spacingGap) {
+ Text(model.t("homeUi.title"))
+ .font(.custom("InterVariable", size: Theme.titleTypeSize, relativeTo: .title).weight(.semibold))
+ Text(model.t("mobile.local.privacy"))
+ .font(.custom("InterVariable", size: Theme.controlTypeSize, relativeTo: .body))
+ .foregroundStyle(theme.color("textMuted"))
+ }
+ .frame(maxWidth: .infinity, alignment: .leading).padding(Theme.compactInset)
+ .background(alignment: .trailing) {
+ GeometryReader { geometry in
+ Image("HomeArtwork").resizable().scaledToFill()
+ .frame(width: geometry.size.width, height: geometry.size.height).clipped().opacity(0.25)
+ .mask(LinearGradient(colors: [theme.color("canvas").opacity(0), theme.color("canvas")], startPoint: .leading, endPoint: .trailing))
+ }.accessibilityHidden(true)
+ }
+ .clipShape(RoundedRectangle(cornerRadius: VSTokens.radiusLg))
+ LazyVGrid(columns: [GridItem(.adaptive(minimum: 280), spacing: VSTokens.spacingGap)], spacing: VSTokens.spacingGap) {
+ destination("speak", title: "mobile.tabs.speak", detail: "mobile.speak.placeholder", icon: "waveform", primary: true) { SpeakView() }
+ destination("voices", title: "nav.clone", detail: "clone.reference_hint", icon: "person.wave.2", primary: true) { VoicesView() }
+ destination("dub", title: "nav.dub", detail: "homeUi.dub", icon: "film", primary: true) { DubView() }
+ destination("dictate", title: "nav.dictation", detail: "mobile.dictate.tap_to_start", icon: "mic") { DictateView() }
+ destination("models", title: "mobile.local.models", detail: "mobile.local.installed", icon: "arrow.down.circle") { ModelsView() }
+ destination("connect", title: "mobile.local.my_computer", detail: "mobile.local.pair_settings", icon: "desktopcomputer") { ConnectView() }
+ }
+ section("projects.generated_audio") {
+ if model.phone.recent.isEmpty && model.history.isEmpty { empty("mobile.speak.empty_recent") }
+ ForEach(model.phone.recent.prefix(4)) { item in
+ Button { Task { await model.performPhone {
+ if let file = try await model.phone.generationStore?.file(item) { try await player.load(Data(contentsOf: file), extension: "wav"); player.play() }
+ } } } label: { row(item.text, subtitle: model.t("mobile.local.this_phone"), icon: "play.circle") }
+ .accessibilityIdentifier("home.audio.\(item.id)")
+ }
+ ForEach(model.history.prefix(4)) { item in
+ Button { Task { await model.perform {
+ let api = try model.api(); try await player.stream(request: api.historyAudioRequest(item.id), api: api)
+ } } } label: { row(item.text, subtitle: model.t("mobile.local.my_computer"), icon: "play.circle") }
+ }
+ if player.file != nil || player.playing { AudioPlayerView(player: player) }
+ }
+ section("projects.title") {
+ if model.phone.dubs.isEmpty && model.dubHistory.isEmpty { empty("projects.empty") }
+ ForEach(model.phone.dubs.prefix(4)) { record in
+ NavigationLink { PhoneDubView(projectID: record.id) } label: {
+ row(record.request.title, subtitle: model.t(record.checkpoint.done ? "mobile.local.this_phone" : record.checkpoint.stage), icon: "film")
+ }.accessibilityIdentifier("home.project.\(record.id)")
+ }
+ if !model.dubHistory.isEmpty {
+ NavigationLink { ComputerDubView() } label: { row(model.t("mobile.dub.history"), subtitle: model.t("mobile.local.my_computer"), icon: "desktopcomputer") }
+ }
+ }
+ section("clone.saved_profiles") {
+ if model.phone.voices.isEmpty && model.profiles.isEmpty { empty("mobile.simple.empty_voices") }
+ ForEach(model.phone.voices.prefix(4)) { voice in
+ NavigationLink { SpeakView(initialPhoneVoiceID: voice.id.uuidString) } label: {
+ row(voice.name, subtitle: model.t("mobile.local.this_phone"), icon: "person.wave.2")
+ }
+ }
+ ForEach(model.profiles.prefix(4)) { voice in
+ NavigationLink { SpeakView(initialComputerVoiceID: voice.id) } label: { row(voice.name, subtitle: model.t("mobile.local.my_computer"), icon: "person.wave.2") }
+ }
+ }
+ }.frame(maxWidth: 900).frame(maxWidth: .infinity)
+ }
+ .navigationTitle(model.t("nav.home")).navigationBarTitleDisplayMode(.inline)
+ .toolbar { NavigationLink { PhoneDubView(libraryOnly: true) } label: { Label(model.t("projects.title"), systemImage: "folder") } }
+ .task { await model.phone.refresh() }
+ .refreshable { await model.phone.refresh(); if model.connection.client != nil { await model.perform { try await model.refresh() } } }
+ .onDisappear { player.pause() }
+ }
+ private func destination<Content: View>(_ id: String, title: String, detail: String, icon: String, primary: Bool = false, @ViewBuilder content: () -> Content) -> some View {
+ NavigationLink(destination: content()) {
+ HStack(spacing: VSTokens.spacingGap) {
+ Image(systemName: icon).font(.title2).foregroundStyle(theme.color("messageAction"))
+ .frame(width: 44, height: 44).background(theme.color("messageSurface"), in: RoundedRectangle(cornerRadius: VSTokens.radiusControl))
+ VStack(alignment: .leading, spacing: VSTokens.spacingGap) {
+ Text(model.t(title)).font(.custom("InterVariable", size: Theme.controlTypeSize, relativeTo: .headline).weight(.semibold))
+ Text(model.t(detail)).font(.custom("InterVariable", size: VSTokens.textUi.size, relativeTo: .body)).foregroundStyle(theme.color("textMuted"))
+ }.frame(maxWidth: .infinity, alignment: .leading)
+ Image(systemName: "arrow.right").foregroundStyle(theme.color("textMuted")).accessibilityHidden(true)
+ }.padding(Theme.compactInset).frame(maxWidth: .infinity, minHeight: primary ? 116 : 96, alignment: .leading)
+ .background(theme.color(primary ? "surfaceRaised" : "surface"), in: RoundedRectangle(cornerRadius: VSTokens.radiusLg))
+ .overlay(RoundedRectangle(cornerRadius: VSTokens.radiusLg).stroke(theme.color("border")))
+ }.buttonStyle(.plain).accessibilityIdentifier("home.\(id)")
+ }
+ private func section<Content: View>(_ key: String, @ViewBuilder content: () -> Content) -> some View {
+ VStack(alignment: .leading, spacing: VSTokens.spacingGap) {
+ Text(model.t(key)).font(.custom("InterVariable", size: Theme.controlTypeSize, relativeTo: .headline).weight(.semibold)).accessibilityAddTraits(.isHeader)
+ VStack(alignment: .leading, spacing: VSTokens.spacingGap, content: content)
+ .buttonStyle(.plain).padding(Theme.compactInset).frame(maxWidth: .infinity, alignment: .leading)
+ .background(theme.color("surface"), in: RoundedRectangle(cornerRadius: VSTokens.radiusLg))
+ .overlay(RoundedRectangle(cornerRadius: VSTokens.radiusLg).stroke(theme.color("border")))
+ }
+ }
+ private func empty(_ key: String) -> some View {
+ Text(model.t(key)).foregroundStyle(theme.color("textMuted")).padding(.vertical, VSTokens.spacingGap)
+ }
+ private func row(_ title: String, subtitle: String, icon: String) -> some View {
+ HStack(spacing: VSTokens.spacingGap) {
+ Image(systemName: icon).foregroundStyle(theme.color("messageAction")).frame(width: 32)
+ VStack(alignment: .leading) { Text(title).lineLimit(2); Text(subtitle).font(.custom("InterVariable", size: VSTokens.textUi.size, relativeTo: .caption)).foregroundStyle(theme.color("textMuted")) }
+ .frame(maxWidth: .infinity, alignment: .leading)
+ Image(systemName: "chevron.right").foregroundStyle(theme.color("textMuted")).accessibilityHidden(true)
+ }.frame(minHeight: 44).contentShape(Rectangle())
+ }
+}
diff --git a/mobile/ios/VoiceStudio/Features/ModelsView.swift b/mobile/ios/VoiceStudio/Features/ModelsView.swift
index c9692c557..553a626e0 100644
--- a/mobile/ios/VoiceStudio/Features/ModelsView.swift
+++ b/mobile/ios/VoiceStudio/Features/ModelsView.swift
@@ -182,7 +182,7 @@ struct LocalDownloadPrompt: View {
if let item = needed.first(where: { !$0.fits() }) {
Text(model.t("mobile.simple.ram", ["ram": String(item.min_ram_gb)])).font(.caption)
}
- }.accessibilityIdentifier("models.prompt")
+ }.accessibilityElement(children: .contain).accessibilityIdentifier("models.prompt")
}
}
}
diff --git a/mobile/ios/VoiceStudio/Features/PhoneDubView.swift b/mobile/ios/VoiceStudio/Features/PhoneDubView.swift
index db961ae0b..bb45bf40d 100644
--- a/mobile/ios/VoiceStudio/Features/PhoneDubView.swift
+++ b/mobile/ios/VoiceStudio/Features/PhoneDubView.swift
@@ -4,6 +4,9 @@ import UniformTypeIdentifiers
import AVKit
struct PhoneDubView: View {
+ var projectID: UUID? = nil
+ var libraryOnly = false
+ private var records: [PhoneDubRecord] { model.phone.dubs.filter { projectID == nil || $0.id == projectID } }
@Environment(AppModel.self) private var model
@Environment(\.vsTheme) private var theme
var connect = false
@@ -24,6 +27,7 @@ struct PhoneDubView: View {
private var ready: Bool { model.phone.dubReady && !connect }
var body: some View {
Page {
+ if projectID == nil && !libraryOnly {
if connect { NavigationLink(model.t("mobile.simple.reconnect")) { ConnectView() } }
Label(model.t("mobile.simple.source"),systemImage: "doc")
Button(model.t("mobile.dub.pick_media"),systemImage: "doc.badge.plus") { importing = true }.disabled(copying)
@@ -57,7 +61,8 @@ struct PhoneDubView: View {
.disabled(!ready || !consent || source == nil || targets.isEmpty || model.busy || copying || model.phone.activeDub != nil)
.accessibilityIdentifier("dub.start")
if copying { ProgressView().accessibilityLabel(model.t("mobile.ios.progress")) }
- ForEach(model.phone.dubs.filter { !$0.checkpoint.done }) { record in
+ }
+ ForEach(records.filter { !$0.checkpoint.done }) { record in
Card {
Text(record.request.title).lineLimit(1)
let progress = model.phone.activeDub == record.id ? model.phone.dubProgress : nil
@@ -78,8 +83,8 @@ struct PhoneDubView: View {
}
}
Text(model.t("mobile.dub.history"))
- if model.phone.dubs.allSatisfy({ $0.checkpoint.outputs.isEmpty }) { EmptyState(key: "mobile.simple.empty_dubs",icon: "film") }
- ForEach(model.phone.dubs) { record in
+ if records.allSatisfy({ $0.checkpoint.outputs.isEmpty }) { EmptyState(key: "mobile.simple.empty_dubs",icon: "film") }
+ ForEach(records) { record in
ForEach(record.checkpoint.outputs) { output in
HStack {
VStack(alignment: .leading) { Text(record.request.title).lineLimit(1); Text(output.name).font(.caption).foregroundStyle(theme.color("textMuted")) }.frame(maxWidth: .infinity,alignment: .leading)
@@ -90,7 +95,7 @@ struct PhoneDubView: View {
}.labelStyle(.iconOnly).buttonStyle(VSButtonStyle(kind: .tertiary))
}
}
- }.navigationTitle(model.t("mobile.tabs.dub")).navigationBarTitleDisplayMode(.large)
+ }.navigationTitle(projectID != nil ? (records.first?.request.title ?? model.t("projects.title")) : model.t(libraryOnly ? "projects.title" : "mobile.tabs.dub")).navigationBarTitleDisplayMode(.large)
.fileImporter(isPresented: $importing,allowedContentTypes: [.movie,.audio]) { result in
switch result { case .success(let url): source = SelectedMedia(url: url); case .failure: model.error = ClientError("mobile.simple.media_failed") }
}
diff --git a/mobile/ios/VoiceStudio/Features/SpeakView.swift b/mobile/ios/VoiceStudio/Features/SpeakView.swift
index 5266797bd..62987a841 100644
--- a/mobile/ios/VoiceStudio/Features/SpeakView.swift
+++ b/mobile/ios/VoiceStudio/Features/SpeakView.swift
@@ -14,6 +14,8 @@ struct VoicePicker: View {
}
}
struct SpeakView: View {
+ var initialPhoneVoiceID: String? = nil
+ var initialComputerVoiceID: String? = nil
@Environment(AppModel.self) private var model
@Environment(\.vsTheme) private var theme
@State private var preference: TaskLocation?
@@ -141,7 +143,7 @@ struct SpeakView: View {
Task { await model.perform { try await model.api().deleteHistory(item.id); model.history = try await model.api().history() } }
}
}
- .onAppear { hostScope = model.hostState.scopeID; preference = model.phone.preference("speak") }
+ .onAppear { hostScope = model.hostState.scopeID; preference = initialPhoneVoiceID == nil ? model.phone.preference("speak") : .phone; if let id = initialPhoneVoiceID { speakerID = "phone:" + id }; if let id = initialComputerVoiceID { preference = .computer; selection.chooseProfile(id, profiles: model.profiles, inventory: model.inventory, catalog: model.languages) } }
.task { await model.phone.refresh(); reconcilePhone() }
.onChange(of: speakerID) { _, _ in reconcilePhone() }
.onChange(of: phoneModel?.id) { _, _ in reconcilePhone() }
diff --git a/mobile/ios/VoiceStudio/Features/VoicesView.swift b/mobile/ios/VoiceStudio/Features/VoicesView.swift
index 2f8610a8d..65f7eb220 100644
--- a/mobile/ios/VoiceStudio/Features/VoicesView.swift
+++ b/mobile/ios/VoiceStudio/Features/VoicesView.swift
@@ -146,7 +146,7 @@ struct CloneView: View {
.fileImporter(isPresented: $importing,allowedContentTypes: [.audio]) { result in
switch result { case .success(let url): audio = SelectedMedia(url: url); case .failure: model.error = ClientError("mobile.errors.file") }
}
- .onChange(of: recorder.seconds) { _, seconds in if seconds >= 30 && recorder.recording { recorder.stop(); audio = recorder.file.map { SelectedMedia(url: $0) } } }
+ .onChange(of: recorder.seconds) { _, seconds in if seconds >= 29 && recorder.recording { recorder.stop(); audio = recorder.file.map { SelectedMedia(url: $0) } } }
.onChange(of: phase) { _, value in if value != .active { work?.cancel(); if value == .background { recordingTask?.cancel() }; if recorder.recording { recorder.stop(); audio = nil } } }
.onDisappear { work?.cancel(); recordingTask?.cancel(); recorder.stop(); if let file = recorder.file { try? FileManager.default.removeItem(at: file) } }
}
diff --git a/mobile/ios/VoiceStudio/Platform/Audio.swift b/mobile/ios/VoiceStudio/Platform/Audio.swift
index 64c918597..1b4fa8cc0 100644
--- a/mobile/ios/VoiceStudio/Platform/Audio.swift
+++ b/mobile/ios/VoiceStudio/Platform/Audio.swift
@@ -165,7 +165,7 @@ struct AudioPlayerView: View {
try session.setCategory(.playAndRecord, mode: .default, options: [.defaultToSpeaker]); try session.setActive(true)
let url = FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString).appendingPathExtension("wav")
let recorder = try AVAudioRecorder(url: url, settings: [AVFormatIDKey: kAudioFormatLinearPCM, AVSampleRateKey: 24000, AVNumberOfChannelsKey: 1, AVLinearPCMBitDepthKey: 16])
- guard recorder.record() else { throw ClientError("mobile.errors.audio") }
+ guard recorder.record(forDuration: 29) else { throw ClientError("mobile.errors.audio") }
self.recorder = recorder; file = url; recording = true; seconds = 0
timer = Task { [weak self] in while !Task.isCancelled { try? await Task.sleep(for: .seconds(1)); guard let self, recording else { return }; seconds += 1 } }
}
diff --git a/mobile/ios/VoiceStudio/Platform/PhoneModels.swift b/mobile/ios/VoiceStudio/Platform/PhoneModels.swift
index b1057f8fd..9f43c056a 100644
--- a/mobile/ios/VoiceStudio/Platform/PhoneModels.swift
+++ b/mobile/ios/VoiceStudio/Platform/PhoneModels.swift
@@ -50,13 +50,16 @@ final class WifiState: @unchecked Sendable {
} else {
root = try FileManager.default.url(for: .applicationSupportDirectory, in: .userDomainMask, appropriateFor: nil, create: true).appendingPathComponent("PhoneModels", isDirectory: true)
}
- dubStore = try PhoneDubStore(root: root.appendingPathComponent("dubs"))
- voiceStore = try PhoneVoiceStore(root: root.appendingPathComponent("voices"))
- generationStore = try PhoneGenerationStore(root: root.appendingPathComponent("recent"))
let store = try ModelStore(root: root)
self.store = store; engine = NativeLocalEngine(store: store)
guard let url = bundle.url(forResource: "models", withExtension: "json", subdirectory: "Catalogs") else { throw ClientError("mobile.local.catalogue_failed") }
models = try ModelCatalogue.decode(Data(contentsOf: url)).models
+ do { dubStore = try PhoneDubStore(root: root.appendingPathComponent("dubs")) }
+ catch { self.error = ClientError("mobile.errors.file") }
+ do { voiceStore = try PhoneVoiceStore(root: root.appendingPathComponent("voices")) }
+ catch { self.error = ClientError("mobile.errors.file") }
+ do { generationStore = try PhoneGenerationStore(root: root.appendingPathComponent("recent")) }
+ catch { self.error = ClientError("mobile.errors.file") }
} catch {
// Initialization remains usable for the paired-host flows; the Models page explains the failure.
@@ -64,8 +67,6 @@ final class WifiState: @unchecked Sendable {
}
}
func refresh() async {
- do { voices = try await voiceStore?.list() ?? []; recent = try await generationStore?.list() ?? []; dubs = try await dubStore?.list() ?? [] }
- catch { self.error = error as? ClientError ?? ClientError("mobile.errors.file") }
guard let store else { return }
var downloaded = Set<String>(); var permitted = Set<String>(); var bytes: [String: Int64] = [:]
for model in models {
@@ -74,6 +75,13 @@ final class WifiState: @unchecked Sendable {
bytes[model.id] = await store.modelStorage(model)
}
installed = downloaded; accepted = permitted; modelBytes = bytes; used = await store.storageUsed()
+ do { voices = try await voiceStore?.list() ?? [] }
+ catch { self.error = ClientError("mobile.errors.file") }
+ do { recent = try await generationStore?.list() ?? [] }
+ catch { self.error = ClientError("mobile.errors.file") }
+ do { dubs = try await dubStore?.list() ?? [] }
+ catch { self.error = ClientError("mobile.errors.file") }
+
}
func ready(_ model: PhoneModel) -> Bool { installed.contains(model.id) && accepted.contains(model.id) && model.fits() }
func candidates(_ capability: ModelCapability) -> [PhoneModel] { models.filter { $0.capability == capability } }
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/Corresponding-source.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/Corresponding-source.txt
new file mode 100644
index 000000000..0c091da43
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/Corresponding-source.txt
@@ -0,0 +1,26 @@
+VoiceStudio native runtime corresponding sources
+
+eSpeak NG is GPL-3.0. Its complete pinned upstream source archive,
+including its build scripts, is listed below. The pinned sherpa-onnx
+source and VoiceStudio mobile/native/ios/build.py and build.sh contain
+the build configuration used to combine these dependencies.
+VoiceStudio source: https://github.com/debpalash/VoiceStudio
+Runtime pins: mobile/native/pins.json
+
+sherpa-onnx: https://github.com/k2-fsa/sherpa-onnx/tree/11afbd009a7f8c08f4bcf2fc1b265d0df4670fbf
+omnivoice.cpp: https://github.com/ServeurpersoCom/omnivoice.cpp/tree/886fc079838ca7400cb2b42b36e2a65aa1daabe8
+omnivoice-ggml: https://github.com/ServeurpersoCom/ggml/tree/f3bc6505c4e2ede83a193e0fb4695938ff3804fd
+llama.cpp: https://github.com/ggml-org/llama.cpp/tree/797de63b2fa7396dcc8caca76834c699ac84e1c3
+llama-ggml: https://github.com/ggml-org/llama.cpp/tree/797de63b2fa7396dcc8caca76834c699ac84e1c3/ggml
+espeak-ng-for-piper: https://github.com/csukuangfj/espeak-ng/archive/ed530aa113046142eb5115cf2fc9157854d0ffe1.zip
+piper-phonemize: https://github.com/csukuangfj/piper-phonemize/archive/f3ff95afc03640bc1399e113e83361192a2fafb4.zip
+kaldi-native-fbank: https://github.com/csukuangfj/kaldi-native-fbank/archive/refs/tags/v1.22.3.tar.gz
+kissfft: https://github.com/mborgerding/kissfft/archive/febd4caeed32e33ad8b2e0bb5ea77542c40f18ec.zip
+kaldi-decoder: https://github.com/k2-fsa/kaldi-decoder/archive/refs/tags/v0.3.0.tar.gz
+eigen: https://gitlab.com/libeigen/eigen/-/archive/5.0.1/eigen-5.0.1.tar.gz
+kaldifst: https://github.com/k2-fsa/kaldifst/archive/refs/tags/v1.8.0.tar.gz
+openfst: https://github.com/csukuangfj/openfst/archive/refs/tags/v1.8.5-2026-07-09.tar.gz
+simple-sentencepiece: https://github.com/pkufool/simple-sentencepiece/archive/refs/tags/v0.7.tar.gz
+json: https://github.com/nlohmann/json/archive/refs/tags/v3.12.0.tar.gz
+hclust-cpp: https://github.com/csukuangfj/hclust-cpp/archive/refs/tags/2026-02-25.tar.gz
+onnxruntime: https://github.com/microsoft/onnxruntime/tree/v1.28.2
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/eigen.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/eigen.txt
new file mode 100644
index 000000000..d2a7481b3
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/eigen.txt
@@ -0,0 +1,1399 @@
+eigen
+Source: https://gitlab.com/libeigen/eigen/-/archive/5.0.1/eigen-5.0.1.tar.gz
+
+eigen-5.0.1/COPYING.APACHE
+
+/*
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+eigen-5.0.1/COPYING.BSD
+
+/*
+ Copyright (c) 2011, Intel Corporation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ * Neither the name of Intel Corporation nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+eigen-5.0.1/COPYING.MINPACK
+
+Minpack Copyright Notice (1999) University of Chicago. All rights reserved
+
+Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the
+following conditions are met:
+
+1. Redistributions of source code must retain the above
+copyright notice, this list of conditions and the following
+disclaimer.
+
+2. Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following
+disclaimer in the documentation and/or other materials
+provided with the distribution.
+
+3. The end-user documentation included with the
+redistribution, if any, must include the following
+acknowledgment:
+
+ "This product includes software developed by the
+ University of Chicago, as Operator of Argonne National
+ Laboratory.
+
+Alternately, this acknowledgment may appear in the software
+itself, if and wherever such third-party acknowledgments
+normally appear.
+
+4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS"
+WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE
+UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND
+THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE
+OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY
+OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR
+USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF
+THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4)
+DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION
+UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL
+BE CORRECTED.
+
+5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT
+HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF
+ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT,
+INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF
+ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF
+PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER
+SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT
+(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE,
+EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE
+POSSIBILITY OF SUCH LOSS OR DAMAGES.
+
+
+eigen-5.0.1/COPYING.MPL2
+
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at https://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
+
+
+eigen-5.0.1/COPYING.README
+
+Eigen is primarily MPL2 licensed. See COPYING.MPL2 and these links:
+ http://www.mozilla.org/MPL/2.0/
+ http://www.mozilla.org/MPL/2.0/FAQ.html
+
+Some files contain third-party code under BSD or other MPL2-compatible licenses,
+whence the other COPYING.* files here.
+
+eigen-5.0.1/LICENSE
+
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
+
+
+eigen-5.0.1/bench/btl/COPYING
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/espeak-ng-for-piper.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/espeak-ng-for-piper.txt
new file mode 100644
index 000000000..46cb494b7
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/espeak-ng-for-piper.txt
@@ -0,0 +1,1705 @@
+espeak-ng-for-piper
+Source: https://github.com/csukuangfj/espeak-ng/archive/ed530aa113046142eb5115cf2fc9157854d0ffe1.zip
+
+espeak-ng-ed530aa113046142eb5115cf2fc9157854d0ffe1/COPYING
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+
+
+espeak-ng-ed530aa113046142eb5115cf2fc9157854d0ffe1/COPYING.APACHE
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+espeak-ng-ed530aa113046142eb5115cf2fc9157854d0ffe1/COPYING.BSD2
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+
+espeak-ng-ed530aa113046142eb5115cf2fc9157854d0ffe1/COPYING.UCD
+
+Unicode Data Files include all data files under the directories
+http://www.unicode.org/Public/, http://www.unicode.org/reports/,
+http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
+http://www.unicode.org/utility/trac/browser/.
+
+Unicode Data Files do not include PDF online code charts under the
+directory http://www.unicode.org/Public/.
+
+Software includes any source code published in the Unicode Standard
+or under the directories
+http://www.unicode.org/Public/, http://www.unicode.org/reports/,
+http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
+http://www.unicode.org/utility/trac/browser/.
+
+NOTICE TO USER: Carefully read the following legal agreement.
+BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
+DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
+YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
+TERMS AND CONDITIONS OF THIS AGREEMENT.
+IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
+THE DATA FILES OR SOFTWARE.
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright © 1991-2018 Unicode, Inc. All rights reserved.
+Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Unicode data files and any associated documentation
+(the "Data Files") or Unicode software and any associated documentation
+(the "Software") to deal in the Data Files or Software
+without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, and/or sell copies of
+the Data Files or Software, and to permit persons to whom the Data Files
+or Software are furnished to do so, provided that either
+(a) this copyright and permission notice appear with all copies
+of the Data Files or Software, or
+(b) this copyright and permission notice appear in associated
+Documentation.
+
+THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in these Data Files or Software without prior
+written authorization of the copyright holder.
+
+
+espeak-ng-ed530aa113046142eb5115cf2fc9157854d0ffe1/src/ucd-tools/COPYING
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+
+
+espeak-ng-ed530aa113046142eb5115cf2fc9157854d0ffe1/src/ucd-tools/COPYING.UCD
+
+Unicode Data Files include all data files under the directories
+http://www.unicode.org/Public/, http://www.unicode.org/reports/,
+http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
+http://www.unicode.org/utility/trac/browser/.
+
+Unicode Data Files do not include PDF online code charts under the
+directory http://www.unicode.org/Public/.
+
+Software includes any source code published in the Unicode Standard
+or under the directories
+http://www.unicode.org/Public/, http://www.unicode.org/reports/,
+http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
+http://www.unicode.org/utility/trac/browser/.
+
+NOTICE TO USER: Carefully read the following legal agreement.
+BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
+DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
+YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
+TERMS AND CONDITIONS OF THIS AGREEMENT.
+IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
+THE DATA FILES OR SOFTWARE.
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright © 1991-2018 Unicode, Inc. All rights reserved.
+Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Unicode data files and any associated documentation
+(the "Data Files") or Unicode software and any associated documentation
+(the "Software") to deal in the Data Files or Software
+without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, and/or sell copies of
+the Data Files or Software, and to permit persons to whom the Data Files
+or Software are furnished to do so, provided that either
+(a) this copyright and permission notice appear with all copies
+of the Data Files or Software, or
+(b) this copyright and permission notice appear in associated
+Documentation.
+
+THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in these Data Files or Software without prior
+written authorization of the copyright holder.
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/hclust-cpp.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/hclust-cpp.txt
new file mode 100644
index 000000000..5acc5ad1c
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/hclust-cpp.txt
@@ -0,0 +1,18 @@
+hclust-cpp
+Source: https://github.com/csukuangfj/hclust-cpp/archive/refs/tags/2026-02-25.tar.gz
+
+hclust-cpp-2026-02-25/LICENSE
+
+Copyright:
+ * fastcluster_dm.cpp & fastcluster_R_dm.cpp:
+ © 2011 Daniel Müllner <http://danifold.net>
+ * fastcluster.(h|cpp) & demo.cpp & plotresult.r:
+ © 2018 Christoph Dalitz <http://www.hsnr.de/ipattern/>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/json.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/json.txt
new file mode 100644
index 000000000..29594e38f
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/json.txt
@@ -0,0 +1,51 @@
+json
+Source: https://github.com/nlohmann/json/archive/refs/tags/v3.12.0.tar.gz
+
+json-3.12.0/LICENSE.MIT
+
+MIT License
+
+Copyright (c) 2013-2025 Niels Lohmann
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+json-3.12.0/docs/mkdocs/docs/home/license.md
+
+# License
+
+<img align="right" src="https://149753425.v2.pressablecdn.com/wp-content/uploads/2009/06/OSIApproved_100X125.png">
+
+The class is licensed under the [MIT License](https://opensource.org/licenses/MIT):
+
+Copyright &copy; 2013-2025 [Niels Lohmann](https://nlohmann.me)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+* * *
+
+The class contains the UTF-8 Decoder from Bjoern Hoehrmann which is licensed under the [MIT License](https://opensource.org/licenses/MIT) (see above). Copyright &copy; 2008-2009 [Björn Hoehrmann](http://bjoern.hoehrmann.de/) <[email protected]>
+
+The class contains a slightly modified version of the Grisu2 algorithm from Florian Loitsch which is licensed under the [MIT License](https://opensource.org/licenses/MIT) (see above). Copyright &copy; 2009 [Florian Loitsch](https://florian.loitsch.com/)
+
+The class contains a copy of [Hedley](https://nemequ.github.io/hedley/) from Evan Nemerson which is licensed as [CC0-1.0](https://creativecommons.org/publicdomain/zero/1.0/).
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/kaldi-decoder.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/kaldi-decoder.txt
new file mode 100644
index 000000000..d73cf645d
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/kaldi-decoder.txt
@@ -0,0 +1,207 @@
+kaldi-decoder
+Source: https://github.com/k2-fsa/kaldi-decoder/archive/refs/tags/v0.3.0.tar.gz
+
+kaldi-decoder-0.3.0/LICENSE
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/kaldi-native-fbank.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/kaldi-native-fbank.txt
new file mode 100644
index 000000000..410b373d8
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/kaldi-native-fbank.txt
@@ -0,0 +1,207 @@
+kaldi-native-fbank
+Source: https://github.com/csukuangfj/kaldi-native-fbank/archive/refs/tags/v1.22.3.tar.gz
+
+kaldi-native-fbank-1.22.3/LICENSE
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/kaldifst.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/kaldifst.txt
new file mode 100644
index 000000000..a157df562
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/kaldifst.txt
@@ -0,0 +1,216 @@
+kaldifst
+Source: https://github.com/k2-fsa/kaldifst/archive/refs/tags/v1.8.0.tar.gz
+
+kaldifst-1.8.0/LICENSE
+
+
+ Legal Notices
+
+ NOTE (this is not from the Apache License): The copyright model is that
+ authors (or their employers, if noted in individual files) own their
+ individual contributions. The authors' contributions can be discerned
+ from the git history.
+
+ -------------------------------------------------------------------------
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/kissfft.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/kissfft.txt
new file mode 100644
index 000000000..9092a97fa
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/kissfft.txt
@@ -0,0 +1,55 @@
+kissfft
+Source: https://github.com/mborgerding/kissfft/archive/febd4caeed32e33ad8b2e0bb5ea77542c40f18ec.zip
+
+kissfft-febd4caeed32e33ad8b2e0bb5ea77542c40f18ec/COPYING
+
+Copyright (c) 2003-2010 Mark Borgerding . All rights reserved.
+
+KISS FFT is provided under:
+
+ SPDX-License-Identifier: BSD-3-Clause
+
+Being under the terms of the BSD 3-clause "New" or "Revised" License,
+according with:
+
+ LICENSES/BSD-3-Clause
+
+
+
+kissfft-febd4caeed32e33ad8b2e0bb5ea77542c40f18ec/LICENSES/BSD-3-Clause
+
+Valid-License-Identifier: BSD-3-Clause
+SPDX-URL: https://spdx.org/licenses/BSD-3-Clause.html
+Usage-Guide:
+ To use the BSD 3-clause "New" or "Revised" License put the following SPDX
+ tag/value pair into a comment according to the placement guidelines in
+ the licensing rules documentation:
+ SPDX-License-Identifier: BSD-3-Clause
+License-Text:
+
+Copyright (c) <year> <owner> . All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its contributors
+may be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/llama-ggml.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/llama-ggml.txt
new file mode 100644
index 000000000..f029ac646
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/llama-ggml.txt
@@ -0,0 +1,26 @@
+llama-ggml
+Source: https://github.com/ggml-org/llama.cpp/tree/797de63b2fa7396dcc8caca76834c699ac84e1c3/ggml
+
+LICENSE
+
+MIT License
+
+Copyright (c) 2023-2026 The ggml authors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/llama.cpp.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/llama.cpp.txt
new file mode 100644
index 000000000..fa3aeb846
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/llama.cpp.txt
@@ -0,0 +1,26 @@
+llama.cpp
+Source: https://github.com/ggml-org/llama.cpp/tree/797de63b2fa7396dcc8caca76834c699ac84e1c3
+
+LICENSE
+
+MIT License
+
+Copyright (c) 2023-2026 The ggml authors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/omnivoice-ggml.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/omnivoice-ggml.txt
new file mode 100644
index 000000000..f5f66a7d9
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/omnivoice-ggml.txt
@@ -0,0 +1,26 @@
+omnivoice-ggml
+Source: https://github.com/ServeurpersoCom/ggml/tree/f3bc6505c4e2ede83a193e0fb4695938ff3804fd
+
+LICENSE
+
+MIT License
+
+Copyright (c) 2023-2026 The ggml authors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/omnivoice.cpp.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/omnivoice.cpp.txt
new file mode 100644
index 000000000..2c0ab2398
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/omnivoice.cpp.txt
@@ -0,0 +1,26 @@
+omnivoice.cpp
+Source: https://github.com/ServeurpersoCom/omnivoice.cpp/tree/886fc079838ca7400cb2b42b36e2a65aa1daabe8
+
+LICENSE
+
+MIT License
+
+Copyright (c) 2023-2026 The omnivoice.cpp authors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/onnxruntime.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/onnxruntime.txt
new file mode 100644
index 000000000..f9a7481c2
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/onnxruntime.txt
@@ -0,0 +1,26 @@
+onnxruntime
+Source: https://github.com/microsoft/onnxruntime/tree/v1.28.2
+
+LICENSE
+
+MIT License
+
+Copyright (c) Microsoft Corporation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/openfst.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/openfst.txt
new file mode 100644
index 000000000..e8282b027
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/openfst.txt
@@ -0,0 +1,18 @@
+openfst
+Source: https://github.com/csukuangfj/openfst/archive/refs/tags/v1.8.5-2026-07-09.tar.gz
+
+openfst-1.8.5-2026-07-09/COPYING
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use these files except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Copyright 2005-2026 Google LLC.
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/piper-phonemize.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/piper-phonemize.txt
new file mode 100644
index 000000000..3c9727f99
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/piper-phonemize.txt
@@ -0,0 +1,71 @@
+piper-phonemize
+Source: https://github.com/csukuangfj/piper-phonemize/archive/f3ff95afc03640bc1399e113e83361192a2fafb4.zip
+
+piper-phonemize-f3ff95afc03640bc1399e113e83361192a2fafb4/LICENSE.md
+
+MIT License
+
+Copyright (c) 2023 Michael Hansen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+piper-phonemize-f3ff95afc03640bc1399e113e83361192a2fafb4/licenses/uni-algo/LICENSE.md
+
+Public Domain License
+
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
+software, either in source code form or as a compiled binary, for any purpose,
+commercial or non-commercial, and by any means.
+
+In jurisdictions that recognize copyright laws, the author or authors of this
+software dedicate any and all copyright interest in the software to the public
+domain. We make this dedication for the benefit of the public at large and to
+the detriment of our heirs and successors. We intend this dedication to be an
+overt act of relinquishment in perpetuity of all present and future rights to
+this software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/sherpa-onnx.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/sherpa-onnx.txt
new file mode 100644
index 000000000..dca2831b8
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/sherpa-onnx.txt
@@ -0,0 +1,207 @@
+sherpa-onnx
+Source: https://github.com/k2-fsa/sherpa-onnx/tree/11afbd009a7f8c08f4bcf2fc1b265d0df4670fbf
+
+LICENSE
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/simple-sentencepiece.txt b/mobile/ios/VoiceStudio/Resources/NativeLicences/simple-sentencepiece.txt
new file mode 100644
index 000000000..6df0d3b58
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/simple-sentencepiece.txt
@@ -0,0 +1,206 @@
+simple-sentencepiece
+Source: https://github.com/pkufool/simple-sentencepiece/archive/refs/tags/v0.7.tar.gz
+
+simple-sentencepiece-0.7/LICENSE
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/mobile/ios/VoiceStudio/Resources/NativeLicences/sources.json b/mobile/ios/VoiceStudio/Resources/NativeLicences/sources.json
new file mode 100644
index 000000000..e5ac8f569
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/NativeLicences/sources.json
@@ -0,0 +1,104 @@
+[
+ {
+ "name": "sherpa-onnx",
+ "source": "https://github.com/k2-fsa/sherpa-onnx/tree/11afbd009a7f8c08f4bcf2fc1b265d0df4670fbf",
+ "source_sha256": "0a8db6c55dd318f4a688faba85f7760b99a6c92e8ef8864479d418531bee1ac2",
+ "notice_sha256": "d4fab8a41f5bb1f7f0df1e8f38bb05da11d6a04368cb308914f5036fb60ba43e"
+ },
+ {
+ "name": "omnivoice.cpp",
+ "source": "https://github.com/ServeurpersoCom/omnivoice.cpp/tree/886fc079838ca7400cb2b42b36e2a65aa1daabe8",
+ "source_sha256": "db7898b061692c2c8a83a43bf9af64ac4419b14a8bc44584aae497fc40cbced5",
+ "notice_sha256": "39170a56e1de354d1e60cba242855bee8b81812ec1520bc0823ffeda4df9d440"
+ },
+ {
+ "name": "omnivoice-ggml",
+ "source": "https://github.com/ServeurpersoCom/ggml/tree/f3bc6505c4e2ede83a193e0fb4695938ff3804fd",
+ "source_sha256": "git-tree-verified",
+ "notice_sha256": "0fa38f8cd0f5acd4a05a6dbe137286983bf57e02ef71cff47fba9e5b3a44362f"
+ },
+ {
+ "name": "llama.cpp",
+ "source": "https://github.com/ggml-org/llama.cpp/tree/797de63b2fa7396dcc8caca76834c699ac84e1c3",
+ "source_sha256": "9bd5be5bc2ab0e0f5146bc6fbdd3a4a834383aaffa105faeeada119e83d51f3e",
+ "notice_sha256": "12ef087d9481007aaa1c8eb2a282e399b9657d23fa00bbc18d88790dbe55afd9"
+ },
+ {
+ "name": "llama-ggml",
+ "source": "https://github.com/ggml-org/llama.cpp/tree/797de63b2fa7396dcc8caca76834c699ac84e1c3/ggml",
+ "source_sha256": "git-tree-verified",
+ "notice_sha256": "16930b4b113376b6a814a0217c580dabda9a461b9fd0ad86c3cc7ecaa6e4b7f8"
+ },
+ {
+ "name": "espeak-ng-for-piper",
+ "source": "https://github.com/csukuangfj/espeak-ng/archive/ed530aa113046142eb5115cf2fc9157854d0ffe1.zip",
+ "source_sha256": "e4e262cbe34f7fe21f91f1ba3397f2728e1f30eafbae7853f2b753a9ed13f0dd",
+ "notice_sha256": "d87e45ed43020f3a0846427e033d1db8751fb2962740ef40ac5d77c3f4630564"
+ },
+ {
+ "name": "piper-phonemize",
+ "source": "https://github.com/csukuangfj/piper-phonemize/archive/f3ff95afc03640bc1399e113e83361192a2fafb4.zip",
+ "source_sha256": "d9cca4e2bdc7d6dd8dffb96a4668283dbd3f77a9c194a3e530c1e8eba9406a5d",
+ "notice_sha256": "4ae3a823befa973a314c9efe7b02933f74eeae2890d6cec735d5594e62320665"
+ },
+ {
+ "name": "kaldi-native-fbank",
+ "source": "https://github.com/csukuangfj/kaldi-native-fbank/archive/refs/tags/v1.22.3.tar.gz",
+ "source_sha256": "9176cc66fc7ce1edf85cf355b06e320c57db6297df74277f575183468893cf61",
+ "notice_sha256": "57d8bae7d6caa796f0adb4eeec037d8828cc9c1b1f2e155e05c5fd383dd181c2"
+ },
+ {
+ "name": "kissfft",
+ "source": "https://github.com/mborgerding/kissfft/archive/febd4caeed32e33ad8b2e0bb5ea77542c40f18ec.zip",
+ "source_sha256": "497103e664168ebe39580b757adbe616f6cf85a16572af581ca7bc42d0ab13fd",
+ "notice_sha256": "2e533500e0eeb6a8fa2b2086d1dc8671ef74a50c1efa24bff311f010a2800562"
+ },
+ {
+ "name": "kaldi-decoder",
+ "source": "https://github.com/k2-fsa/kaldi-decoder/archive/refs/tags/v0.3.0.tar.gz",
+ "source_sha256": "b9f34cfb4fd3b1344100eead79ef4d37aa15962274b9e3056de345021f76a1b0",
+ "notice_sha256": "5dcb6878e118ccc24a443b5ce8faab1e45b9373e9a24fd4b245769c555b27bd7"
+ },
+ {
+ "name": "eigen",
+ "source": "https://gitlab.com/libeigen/eigen/-/archive/5.0.1/eigen-5.0.1.tar.gz",
+ "source_sha256": "e9c326dc8c05cd1e044c71f30f1b2e34a6161a3b6ecf445d56b53ff1669e3dec",
+ "notice_sha256": "363070b197c621158ebdc39bd94aa23fc183f505a37c3fe38a78dbad234c0c5a"
+ },
+ {
+ "name": "kaldifst",
+ "source": "https://github.com/k2-fsa/kaldifst/archive/refs/tags/v1.8.0.tar.gz",
+ "source_sha256": "3f247b7e5a2409071202f5e2bc6200060f66728c0a3443c03923ad2723e040b3",
+ "notice_sha256": "7e09a71204d285b5333cac521cfdd6cfcc1fe5779c5b8afeb915b8acba4e7cf6"
+ },
+ {
+ "name": "openfst",
+ "source": "https://github.com/csukuangfj/openfst/archive/refs/tags/v1.8.5-2026-07-09.tar.gz",
+ "source_sha256": "2ff712a32952fcb01d351121a6bc8ccf4fdc6b2aa06ce8df2b3095dedd518c0e",
+ "notice_sha256": "16ba8592a6b01be206a2d6d9fff24308b29536f82139ca371a79e32c50a180db"
+ },
+ {
+ "name": "simple-sentencepiece",
+ "source": "https://github.com/pkufool/simple-sentencepiece/archive/refs/tags/v0.7.tar.gz",
+ "source_sha256": "1748a822060a35baa9f6609f84efc8eb54dc0e74b9ece3d82367b7119fdc75af",
+ "notice_sha256": "42a99318e12c88881e719963f524a2a102b9b65b9fba7366b10d7aad7bbfac66"
+ },
+ {
+ "name": "json",
+ "source": "https://github.com/nlohmann/json/archive/refs/tags/v3.12.0.tar.gz",
+ "source_sha256": "4b92eb0c06d10683f7447ce9406cb97cd4b453be18d7279320f7b2f025c10187",
+ "notice_sha256": "261714a3aed6a9fb231b1f8f535134cde3810c6408911f0911511c15da1ef506"
+ },
+ {
+ "name": "hclust-cpp",
+ "source": "https://github.com/csukuangfj/hclust-cpp/archive/refs/tags/2026-02-25.tar.gz",
+ "source_sha256": "8f14e024c709d73afb40ae69cb22de4b73dba67cbce40f2e518813da8139ab56",
+ "notice_sha256": "5a32b0e8039f46caa5244c0684c2f024a5182214ae020f132703083ade10241a"
+ },
+ {
+ "name": "onnxruntime",
+ "source": "https://github.com/microsoft/onnxruntime/tree/v1.28.2",
+ "source_sha256": "2f07c72751aed99790b8a4869cf2311df85a860b22ded05fa22803587a48922c",
+ "notice_sha256": "41c9bfd924df1ba7f79735358c96c35123ec899528f2584c0449699c9348b7de"
+ }
+]
diff --git a/mobile/ios/VoiceStudio/project.yml b/mobile/ios/VoiceStudio/project.yml
index 744b4a487..de1aeb444 100644
--- a/mobile/ios/VoiceStudio/project.yml
+++ b/mobile/ios/VoiceStudio/project.yml
@@ -61,6 +61,17 @@ targets:
outputFiles:
- $(DERIVED_FILE_DIR)/VoiceStudio-Info.plist
- $(SRCROOT)/../.generated/Brand.xcassets
+ VoiceStudioKitTests:
+ type: bundle.unit-test
+ platform: iOS
+ sources:
+ - path: ../VoiceStudioKit/Tests/VoiceStudioKitTests
+ dependencies:
+ - target: VoiceStudio
+ settings:
+ base:
+ GENERATE_INFOPLIST_FILE: 'YES'
+ OTHER_SWIFT_FLAGS: $(inherited) -Xcc -fmodule-map-file=$(SRCROOT)/../VoiceStudioKit/Sources/VSNative/include/module.modulemap
VoiceStudioUITests:
type: bundle.ui-testing
platform: iOS
@@ -72,6 +83,13 @@ targets:
base:
GENERATE_INFOPLIST_FILE: 'YES'
schemes:
+ VoiceStudioNative:
+ build:
+ targets:
+ VoiceStudio: all
+ test:
+ targets:
+ - VoiceStudioKitTests
VoiceStudio:
build:
targets:
diff --git a/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/AVDubMedia.swift b/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/AVDubMedia.swift
index 57c1baf43..4b6d24948 100644
--- a/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/AVDubMedia.swift
+++ b/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/AVDubMedia.swift
@@ -1,6 +1,13 @@
import Foundation
@preconcurrency import AVFoundation
+private final class AudioReadFailure: @unchecked Sendable {
+ private let lock = NSLock()
+ private var failure: (any Error)?
+ var value: (any Error)? { lock.withLock { failure } }
+ func set(_ error: any Error) { lock.withLock { failure = error } }
+}
+
/// AVAssetReader extracts directly to 24-kHz mono float PCM in bounded buffers.
public struct AVPhoneAudioDecoder: PhoneAudioDecoder {
public init() {}
@@ -22,7 +29,7 @@ public struct AVPhoneAudioDecoder: PhoneAudioDecoder {
let handle = try FileHandle(forWritingTo: PrivateFiles.empty(output)); defer { try? handle.close(); reader.cancelReading() }
guard reader.startReading() else { throw ClientError("mobile.simple.media_failed") }
var count = 0
- let totalFrames = Int((duration*24000).rounded())
+ let totalFrames = min(Int(maxSeconds*24000),Int((duration*24000).rounded()))
func pad(_ frames: Int) throws {
var remaining = frames
while remaining > 0 { try Task.checkCancellation(); let size = min(8192,remaining); try handle.write(contentsOf: Data(count: size*4)); remaining -= size }
@@ -36,7 +43,7 @@ public struct AVPhoneAudioDecoder: PhoneAudioDecoder {
let timestamp = CMSampleBufferGetPresentationTimeStamp(buffer).seconds
guard timestamp.isFinite else { throw ClientError("mobile.simple.media_failed") }
let position = Int((timestamp*24000).rounded())
- guard position <= totalFrames else { throw ClientError("mobile.simple.media_failed") }
+ if position >= totalFrames { continue }
if position > count { try pad(position-count); count = position }
let skip = max(0,count-position)
let frames = min(bytes.count/4-skip,totalFrames-count)
@@ -62,16 +69,16 @@ public struct AVPhoneAudioDecoder: PhoneAudioDecoder {
var finished = false, total = 0
while !finished {
try Task.checkCancellation()
- var conversionError: NSError?, readError: (any Error)?
+ var conversionError: NSError?
+ let readError = AudioReadFailure()
let status = converter.convert(to: buffer,error: &conversionError) { count,status in
if input.framePosition >= input.length { status.pointee = .endOfStream; return nil }
guard let sourceBuffer = AVAudioPCMBuffer(pcmFormat: input.processingFormat,frameCapacity: count) else { status.pointee = .endOfStream; return nil }
do { try input.read(into: sourceBuffer,frameCount: count); status.pointee = .haveData; return sourceBuffer }
- catch { readError = error; status.pointee = .endOfStream; return nil }
+ catch { readError.set(error); status.pointee = .endOfStream; return nil }
}
- guard status != .error, conversionError == nil, readError == nil, let channel = buffer.floatChannelData?[0] else { throw ClientError("mobile.simple.media_failed") }
- let count = Int(buffer.frameLength); total += count
- guard total <= Int(maxSeconds*24000)+1 else { throw ClientError("mobile.simple.audio_long") }
+ guard status != .error, conversionError == nil, readError.value == nil, let channel = buffer.floatChannelData?[0] else { throw ClientError("mobile.simple.media_failed") }
+ let count = min(Int(buffer.frameLength),max(0,Int(maxSeconds*24000)-total)); total += count
if count > 0 {
let bytes = Data(bytes: channel,count: count*4)
try handle.write(contentsOf: bytes)
@@ -115,7 +122,9 @@ public struct AVPhoneDubMedia: PhoneDubMedia {
let formats = try await videoTrack.load(.formatDescriptions)
let videoInput = AVAssetWriterInput(mediaType: .video,outputSettings: nil,sourceFormatHint: formats.first)
videoInput.transform = try await videoTrack.load(.preferredTransform)
- let audioInput = AVAssetWriterInput(mediaType: .audio,outputSettings: [AVFormatIDKey: kAudioFormatMPEG4AAC,AVSampleRateKey: 24000,AVNumberOfChannelsKey: 1,AVEncoderBitRateKey: 96000])
+ // Let the platform select a supported bitrate for 24-kHz mono AAC.
+ // Forcing 96 kb/s can fail with "Cannot Encode Media" (-11861).
+ let audioInput = AVAssetWriterInput(mediaType: .audio,outputSettings: [AVFormatIDKey: kAudioFormatMPEG4AAC,AVSampleRateKey: 24000,AVNumberOfChannelsKey: 1])
guard writer.canAdd(videoInput), writer.canAdd(audioInput) else { throw ClientError("mobile.simple.media_failed") }
writer.add(videoInput); writer.add(audioInput)
let provenance = AVMutableMetadataItem(); provenance.identifier = .commonIdentifierDescription; provenance.value = "VoiceStudio synthetic audio" as NSString
diff --git a/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/LocalEngine.swift b/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/LocalEngine.swift
index 41053adb1..178c22eed 100644
--- a/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/LocalEngine.swift
+++ b/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/LocalEngine.swift
@@ -8,8 +8,10 @@ public struct PCMChunk: Sendable {
public init(pcm16: Data, sampleRate: Int = 16000) throws {
guard pcm16.count.isMultiple(of: 2) else { throw ClientError("mobile.errors.audio") }
self.sampleRate = sampleRate
- samples = stride(from: 0, to: pcm16.count, by: 2).map { index in
- Float(Int16(bitPattern: UInt16(pcm16[index]) | UInt16(pcm16[index + 1]) << 8)) / 32768
+ samples = pcm16.withUnsafeBytes { bytes in
+ stride(from: 0,to: bytes.count,by: 2).map { index in
+ Float(Int16(bitPattern: UInt16(bytes[index]) | UInt16(bytes[index + 1]) << 8)) / 32768
+ }
}
}
}
@@ -83,7 +85,7 @@ actor NativeLease {
}
}
/// C allocations never escape the worker. Only the atomic cancellation flag crosses tasks.
-private final class NativeCancellation: @unchecked Sendable {
+final class NativeCancellation: @unchecked Sendable {
let pointer: OpaquePointer
private let lock = NSLock()
private var finished = false
@@ -137,39 +139,50 @@ public actor NativeLocalEngine: LocalEngine {
guard let samples = value.samples, value.count > 0 else { throw ClientError("mobile.local.inference_failed") }
return LocalAudio(samples: Array(UnsafeBufferPointer(start: samples, count: Int(value.count))), sampleRate: Int(value.sample_rate))
}
- private func execute<T: Sendable>(_ model: PhoneModel, capability: ModelCapability, progress: @escaping EngineProgressHandler,
- body: @escaping @Sendable (PhoneModel, URL, String, NativeCancellation) throws -> T) async throws -> T {
+ func execute<T: Sendable>(_ model: PhoneModel, capability: ModelCapability, progress: @escaping EngineProgressHandler,
+ body: @escaping @Sendable (PhoneModel, URL, String, NativeCancellation) throws -> T) async throws -> T {
guard model.capability == capability else { throw ClientError("mobile.local.model_incompatible") }
- let root = try await store.acquire(model)
- do {
- try await NativeLease.shared.acquire()
- } catch { await store.release(model); throw error }
- defer { Task { await NativeLease.shared.release() } }
- do {
- let token = try NativeCancellation()
- let library = libraries[model.runtime] ?? ""
- let work = Task.detached(priority: .userInitiated) { defer { token.finish() }; return try body(model, root, library, token) }
- let result = try await withTaskCancellationHandler {
- try await withThrowingTaskGroup(of: Void.self) { group in
- group.addTask {
- await progress(EngineProgress(stage: .loading, fraction: 0))
- while !token.done {
- try Task.checkCancellation()
- await progress(EngineProgress(stage: .running, fraction: Double(vs_progress(token.pointer))))
- try await Task.sleep(for: .milliseconds(100))
- }
+ _ = try await store.acquire(model)
+ let token: NativeCancellation
+ do { token = try NativeCancellation() } catch { await store.release(model); throw error }
+ let library = libraries[model.runtime] ?? "", store = store
+ // The worker owns both leases. Awaiter cancellation cannot release memory in use by C.
+ let work = Task.detached(priority: .userInitiated) {
+ do { try await NativeLease.shared.acquire() }
+ catch { token.finish(); await store.release(model); throw error }
+ let result: Result<T, any Error>
+ do {
+ // Another queued load may have invalidated stamps or lost licence permission.
+ let root = try await store.authorize(model)
+ try Task.checkCancellation()
+ result = .success(try body(model,root,library,token))
+ }
+ catch { result = .failure(error) }
+ token.finish() // body has returned and all native defer cleanup has completed.
+ if case .failure(let error) = result, !(error is CancellationError) { await store.invalidateVerification(model) }
+ await store.release(model)
+ await NativeLease.shared.release()
+ return try result.get()
+ }
+ let result = try await withTaskCancellationHandler {
+ try await withThrowingTaskGroup(of: Void.self) { group in
+ group.addTask {
+ await progress(EngineProgress(stage: .loading,fraction: 0))
+ while !token.done {
+ try Task.checkCancellation()
+ await progress(EngineProgress(stage: .running,fraction: Double(vs_progress(token.pointer))))
+ try await Task.sleep(for: .milliseconds(100))
}
- defer { group.cancelAll() }
- let result = try await work.value
- try Task.checkCancellation()
- return result
}
- } onCancel: { token.cancel(); work.cancel() }
- try await store.checkPermission(model)
- await store.release(model)
- await progress(EngineProgress(stage: .finished, fraction: 1))
- return result
- } catch { await store.release(model); throw error }
+ defer { group.cancelAll() }
+ let result = try await work.value
+ try Task.checkCancellation()
+ return result
+ }
+ } onCancel: { token.cancel(); work.cancel() }
+ try await store.checkPermission(model)
+ await progress(EngineProgress(stage: .finished,fraction: 1))
+ return result
}
public func synthesize(model: PhoneModel, text: String, speaker: Int = 0, speed: Float = 1, progress: @escaping EngineProgressHandler = { _ in }) async throws -> LocalAudio {
guard !text.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty, speaker >= 0, speaker <= Int(Int32.max), speed.isFinite, speed > 0, speed <= 4, speaker < Int(model.config["num_speakers"]?.number ?? 1) else { throw ClientError("mobile.local.model_incompatible") }
@@ -227,7 +240,7 @@ public actor NativeLocalEngine: LocalEngine {
}
public func streamTranscribe(model: PhoneModel, chunks: AsyncThrowingStream<PCMChunk, any Error>, progress: @escaping EngineProgressHandler = { _ in }) async throws -> AsyncThrowingStream<TranscriptUpdate, any Error> {
guard model.capability == .stream else { throw ClientError("mobile.local.model_incompatible") }
- let root = try await store.acquire(model)
+ _ = try await store.acquire(model)
let token: NativeCancellation
do { token = try NativeCancellation() } catch { await store.release(model); throw error }
let library = libraries[model.runtime] ?? ""
@@ -237,8 +250,9 @@ public actor NativeLocalEngine: LocalEngine {
do {
try await NativeLease.shared.acquire()
} catch { continuation.finish(throwing: error); await store.release(model); return }
- defer { Task { await NativeLease.shared.release() } }
do {
+ let root = try await store.authorize(model)
+ try Task.checkCancellation()
await progress(EngineProgress(stage: .loading, fraction: 0))
let config = NativeConfiguration(model: model, root: root, library: library)
guard let stream = vs_stream_create(&config.value) else { throw ClientError("mobile.local.inference_failed") }
@@ -265,7 +279,12 @@ public actor NativeLocalEngine: LocalEngine {
try accept(PCMChunk(samples: [], sampleRate: 16000), finished: true)
await progress(EngineProgress(stage: .finished, fraction: 1))
continuation.finish()
- } catch { continuation.finish(throwing: error) }
+ } catch {
+ if !(error is CancellationError) { await store.invalidateVerification(model) }
+ continuation.finish(throwing: error)
+ }
+ // The stream and recognizer have been freed by the inner scope's defer.
+ await NativeLease.shared.release()
await store.release(model)
}
continuation.onTermination = { _ in token.cancel(); work.cancel() }
diff --git a/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/ModelStore.swift b/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/ModelStore.swift
index ab5bf6082..8061463ab 100644
--- a/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/ModelStore.swift
+++ b/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/ModelStore.swift
@@ -48,16 +48,24 @@ public actor ModelStore {
private var acceptances: [String: [LicenceAcceptance]] = [:]
private var active = Set<String>()
private var leases: [String: Int] = [:]
+ private struct VerificationStamp: Equatable {
+ let size: Int64
+ let modified: Date
+ let identity: String
+ }
+ private var verified: [URL: VerificationStamp] = [:]
+ private let fileHash: @Sendable (URL) throws -> String
private let ram: UInt64
private let available: @Sendable (URL) throws -> Int64
public init(root: URL, ram: UInt64 = ProcessInfo.processInfo.physicalMemory,
+ fileHash: @escaping @Sendable (URL) throws -> String = { try ModelHash.file($0) },
available: @escaping @Sendable (URL) throws -> Int64 = { url in
let values = try url.resourceValues(forKeys: [.volumeAvailableCapacityForImportantUsageKey, .volumeAvailableCapacityKey])
if let capacity = values.volumeAvailableCapacityForImportantUsage, capacity > 0 { return capacity }
if let capacity = values.volumeAvailableCapacity, capacity > 0 { return Int64(capacity) }
return (try FileManager.default.attributesOfFileSystem(forPath: url.path)[.systemFreeSize] as? NSNumber)?.int64Value ?? 0
}) throws {
- self.root = root; self.ram = ram; self.available = available
+ self.root = root; self.ram = ram; self.available = available; self.fileHash = fileHash
try FileManager.default.createDirectory(at: root, withIntermediateDirectories: true)
var excluded = root; var values = URLResourceValues(); values.isExcludedFromBackup = true; try excluded.setResourceValues(values)
if FileManager.default.fileExists(atPath: root.appendingPathComponent("acceptance.json").path) {
@@ -84,12 +92,33 @@ public actor ModelStore {
guard model.fits(ram: ram) else { throw ClientError("mobile.local.ram_required", params: ["ram": String(model.min_ram_gb)]) }
guard allowed(model) else { throw ClientError("mobile.local.licence_required") }
guard installed(model) else { throw ClientError("mobile.local.model_required") }
- for f in model.files { guard try ModelHash.file(directory(model).appendingPathComponent(f.path)) == f.sha256 else { throw ClientError("mobile.local.checksum_failed") } }
+ let identity = try phoneModelPin(model)
+ for f in model.files { guard try verify(directory(model).appendingPathComponent(f.path), file: f, identity: identity) else { throw ClientError("mobile.local.checksum_failed") } }
return directory(model)
}
public func acquire(_ model: PhoneModel) throws -> URL { let path = try authorize(model); leases[model.id, default: 0] += 1; return path }
public func release(_ model: PhoneModel) { leases[model.id] = max(0, (leases[model.id] ?? 0) - 1) }
public func checkPermission(_ model: PhoneModel) throws { guard allowed(model) else { throw ClientError("mobile.local.licence_required") } }
+ /// A native load failure forces a fresh hash before another use, even if metadata is unchanged.
+ public func invalidateVerification(_ model: PhoneModel) {
+ for file in model.files { verified.removeValue(forKey: directory(model).appendingPathComponent(file.path)) }
+ }
+ private func stamp(_ url: URL, identity: String) throws -> VerificationStamp {
+ let values = try FileManager.default.attributesOfItem(atPath: url.path)
+ guard values[.type] as? FileAttributeType == .typeRegular,
+ let size = values[.size] as? NSNumber, let modified = values[.modificationDate] as? Date else { throw ClientError("mobile.local.checksum_failed") }
+ return VerificationStamp(size: size.int64Value,modified: modified,identity: identity)
+ }
+ private func verify(_ url: URL, file: PhoneModel.File, identity: String) throws -> Bool {
+ guard FileManager.default.fileExists(atPath: url.path) else { return false }
+ let before = try stamp(url,identity: identity)
+ guard before.size == file.size else { verified.removeValue(forKey: url); return false }
+ if verified[url] == before { return true }
+ verified.removeValue(forKey: url)
+ guard try fileHash(url) == file.sha256, try stamp(url,identity: identity) == before else { return false }
+ verified[url] = before
+ return true
+ }
public func storageUsed() -> Int64 { directoryStorage(root) }
public func modelStorage(_ model: PhoneModel) -> Int64 { directoryStorage(directory(model)) }
private func directoryStorage(_ directory: URL) -> Int64 {
@@ -103,6 +132,7 @@ public actor ModelStore {
public func delete(_ model: PhoneModel) throws {
guard !active.contains(model.id), leases[model.id, default: 0] == 0 else { throw ClientError("sidebarTools.wait") }
let path = directory(model)
+ invalidateVerification(model)
if FileManager.default.fileExists(atPath: path.path) { try FileManager.default.removeItem(at: path) }
}
/// Call only from a user action. Each range is persisted before the next request, including across relaunch.
@@ -116,11 +146,12 @@ public actor ModelStore {
active.insert(model.id); defer { active.remove(model.id) }
let transport = supplied ?? ModelDownloadTransport(policy: policy)
try FileManager.default.createDirectory(at: directory(model), withIntermediateDirectories: true)
+ let identity = try phoneModelPin(model)
var completed: Int64 = 0
for f in model.files {
try Task.checkCancellation(); try checkPermission(model)
let destination = directory(model).appendingPathComponent(f.path)
- if size(destination) == f.size, try ModelHash.file(destination) == f.sha256 { completed += f.size; continue }
+ if try verify(destination,file: f,identity: identity) { completed += f.size; continue }
let part = partial(model, f)
try FileManager.default.createDirectory(at: part.deletingLastPathComponent(), withIntermediateDirectories: true)
if size(part) > f.size { try FileManager.default.removeItem(at: part) }
@@ -164,10 +195,13 @@ public actor ModelStore {
guard received else { throw lastFailure ?? ClientError("mobile.local.download_failed") }
await progress(Double(completed + size(part)) / Double(model.total_bytes))
}
- guard try ModelHash.file(part) == f.sha256 else { try? FileManager.default.removeItem(at: part); throw ClientError("mobile.local.checksum_failed") }
+ guard try verify(part,file: f,identity: identity) else { try? FileManager.default.removeItem(at: part); throw ClientError("mobile.local.checksum_failed") }
try FileManager.default.createDirectory(at: destination.deletingLastPathComponent(), withIntermediateDirectories: true)
if FileManager.default.fileExists(atPath: destination.path) { try FileManager.default.removeItem(at: destination) }
- try FileManager.default.moveItem(at: part, to: destination); completed += f.size
+ try FileManager.default.moveItem(at: part, to: destination)
+ verified.removeValue(forKey: part)
+ verified[destination] = try stamp(destination,identity: identity)
+ completed += f.size
}
try Task.checkCancellation(); try checkPermission(model)
try JSONEncoder().encode(Dictionary(uniqueKeysWithValues: model.files.map { ($0.path, $0.sha256) })).write(to: directory(model).appendingPathComponent("verified.json"), options: .atomic)
diff --git a/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/PhoneDub.swift b/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/PhoneDub.swift
index e4ad0c1ff..2182ed1e1 100644
--- a/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/PhoneDub.swift
+++ b/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/PhoneDub.swift
@@ -117,7 +117,7 @@ public actor PhoneDubStore {
public func list() throws -> [PhoneDubRecord] {
try FileManager.default.contentsOfDirectory(at: root,includingPropertiesForKeys: nil).compactMap { dir in
guard let id = UUID(uuidString: dir.lastPathComponent), FileManager.default.fileExists(atPath: dir.appendingPathComponent("request.json").path) else { return nil }
- return try PhoneDubRecord(request: request(id),checkpoint: checkpoint(id))
+ return try? PhoneDubRecord(request: request(id),checkpoint: checkpoint(id))
}.sorted { $0.request.createdAt > $1.request.createdAt }
}
public func verifiedOutput(_ id: UUID,_ output: PhoneDubOutput) throws -> URL {
@@ -208,11 +208,16 @@ public struct PhoneDubPipeline: Sendable {
if request.referenceText != nil {
let pcm = PCMFile(try await store.file(id,"reference.pcm")); reference = try pcm.read(start: 0,count: pcm.frames)
} else { reference = try original.clip(start: segment.speech.start,end: min(segment.speech.end,segment.speech.start+8)) }
+ let savedText = (request.referenceText ?? segment.referenceText)?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
let referenceText: String
- if let text = request.referenceText ?? segment.referenceText { referenceText = text }
+ if !savedText.isEmpty { referenceText = savedText }
else {
- referenceText = try await engine.transcribe(model: asr,audio: reference,progress: { _ in }).trimmingCharacters(in: .whitespacesAndNewlines)
+ let recognized = try await engine.transcribe(model: asr,audio: reference,progress: { _ in }).trimmingCharacters(in: .whitespacesAndNewlines)
+ // Quiet/short clips still have the segment's original ASR transcript.
+ referenceText = recognized.isEmpty ? segment.speech.text.trimmingCharacters(in: .whitespacesAndNewlines) : recognized
guard !referenceText.isEmpty else { throw ClientError("mobile.simple.no_speech") }
+ }
+ if segment.referenceText != referenceText {
segment.referenceText = referenceText; cp.segments[index] = segment; try await save(cp)
}
let generated = try await engine.clone(model: clone,text: segment.translations[target.code]!,reference: reference,referenceText: referenceText,progress: { value in await report(PhoneDubProgress(stage: "mobile.android.stage_render",percent: progress+Int(value.fraction))) })
diff --git a/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/PhoneGenerations.swift b/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/PhoneGenerations.swift
index d2a24c561..dd80731da 100644
--- a/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/PhoneGenerations.swift
+++ b/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/PhoneGenerations.swift
@@ -9,7 +9,7 @@ public actor PhoneGenerationStore {
private let root: URL
public init(root: URL) throws { self.root = root; try PrivateFiles.directory(root) }
public func list() throws -> [PhoneGeneration] {
- try FileManager.default.contentsOfDirectory(at: root,includingPropertiesForKeys: nil).filter { $0.pathExtension == "json" }.map { try PrivateFiles.read(PhoneGeneration.self,from: $0) }.sorted { $0.createdAt > $1.createdAt }
+ try FileManager.default.contentsOfDirectory(at: root,includingPropertiesForKeys: nil).filter { $0.pathExtension == "json" }.compactMap { try? PrivateFiles.read(PhoneGeneration.self,from: PrivateFiles.child(root,$0.lastPathComponent)) }.sorted { $0.createdAt > $1.createdAt }
}
public func save(text: String, audio: LocalAudio) throws -> PhoneGeneration {
let item = PhoneGeneration(id: UUID(),text: text,createdAt: Date())
diff --git a/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/PhoneVoices.swift b/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/PhoneVoices.swift
index 8e447a1ff..fd442ddb1 100644
--- a/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/PhoneVoices.swift
+++ b/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Local/PhoneVoices.swift
@@ -17,12 +17,15 @@ public actor PhoneVoiceStore {
private func directory(_ id: UUID) throws -> URL { try PrivateFiles.child(root,id.uuidString) }
public func list() throws -> [PhoneVoice] {
try FileManager.default.contentsOfDirectory(at: root, includingPropertiesForKeys: nil).filter { UUID(uuidString: $0.lastPathComponent) != nil }.compactMap { dir in
- let path = try PrivateFiles.child(dir,"voice.json")
+ do {
+ let safe = try PrivateFiles.child(root,dir.lastPathComponent)
+ let path = try PrivateFiles.child(safe,"voice.json")
guard FileManager.default.fileExists(atPath: path.path) else { return nil }
let voice = try PrivateFiles.read(PhoneVoice.self,from: path)
- let frames = try PCMFile(PrivateFiles.child(dir,"reference.pcm")).frames
+ let frames = try PCMFile(PrivateFiles.child(safe,"reference.pcm")).frames
guard voice.id.uuidString == dir.lastPathComponent, voice.sampleRate == 24000, !voice.name.isEmpty, !voice.transcript.isEmpty, (2400...720000).contains(frames) else { throw ClientError("mobile.simple.clone_failed") }
return voice
+ } catch { return nil }
}.sorted { $0.createdAt > $1.createdAt }
}
public func create(name: String, source: URL, consent: Bool, asr: PhoneModel, engine: any LocalEngine, decoder: any PhoneAudioDecoder, progress: @escaping EngineProgressHandler = { _ in }) async throws -> PhoneVoice {
diff --git a/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Models/ErrorPresentation.swift b/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Models/ErrorPresentation.swift
new file mode 100644
index 000000000..40fba81dd
--- /dev/null
+++ b/mobile/ios/VoiceStudioKit/Sources/VoiceStudioKit/Models/ErrorPresentation.swift
@@ -0,0 +1,22 @@
+import Foundation
+
+/// Compact headings keep the precise localized recovery instruction visible below them.
+public struct ErrorPresentation: Sendable {
+ public let title: String
+ public let detail: String?
+ public init(_ error: ClientError, l10n: L10n, titleKey: String? = nil) {
+ let key = titleKey ?? Self.shortTitle(error.key)
+ title = l10n.t(key)
+ let specific = l10n.t(error.key,error.params)
+ detail = specific == title ? nil : specific
+ }
+ private static func shortTitle(_ key: String) -> String {
+ if key.hasPrefix("mobile.simple.") { return key }
+ if key.hasPrefix("mobile.local.") { return "mobile.simple.models_error" }
+ if key.contains("offline") || key.contains("connection") { return "mobile.simple.connection_error" }
+ if key.contains("file") || key.contains("media") { return "mobile.simple.media_failed" }
+ if key.contains("clone") { return "mobile.simple.clone_failed" }
+ if key.contains("dub") { return "mobile.simple.dub_failed" }
+ return "mobile.simple.error"
+ }
+}
diff --git a/mobile/ios/VoiceStudioKit/Tests/VoiceStudioKitTests/LocalInferenceTests.swift b/mobile/ios/VoiceStudioKit/Tests/VoiceStudioKitTests/LocalInferenceTests.swift
index f03582478..5a02ec184 100644
--- a/mobile/ios/VoiceStudioKit/Tests/VoiceStudioKitTests/LocalInferenceTests.swift
+++ b/mobile/ios/VoiceStudioKit/Tests/VoiceStudioKitTests/LocalInferenceTests.swift
@@ -163,7 +163,11 @@ private actor RangeServer: HTTPTransport {
}
@Test func localRedirectsStayWithinModelDeliveryOrigins() {
for url in ["https://huggingface.co/resolve", "https://cdn-lfs.hf.co/model", "https://cas-bridge.xethub.hf.co/model", "https://hf-mirror.com/model"] { #expect(ModelRedirectDelegate.allowed(URL(string: url)!)) }
- for url in ["http://huggingface.co/model", "https://huggingface.co.evil.test/model", "https://example.org/model", "https://user:[email protected]/model"] { #expect(!ModelRedirectDelegate.allowed(URL(string: url)!)) }
+ for url in ["http://huggingface.co/model", "https://huggingface.co.evil.test/model", "https://example.org/model"] { #expect(!ModelRedirectDelegate.allowed(URL(string: url)!)) }
+ var credentials = URLComponents()
+ credentials.scheme = "https"; credentials.host = "huggingface.co"; credentials.path = "/model"
+ credentials.user = "user"; credentials.password = "password"
+ #expect(!ModelRedirectDelegate.allowed(credentials.url!))
}
@Test func localSyntheticAudioHasValidRiffSizeAndMark() throws {
let bytes = try LocalAudio(samples: [0, 0.5, -0.5], sampleRate: 24000).markSynthetic()
@@ -222,6 +226,32 @@ func realSherpaSynthesizesAndTranscribesOffline() async throws {
for await _ in events { observedProgress = true; generation.cancel(); break }
#expect(observedProgress)
await #expect(throws: CancellationError.self) { try await generation.value }
+ // Cancel a real recognizer while its progress callback is suspended. Native
+ // handles still exist here, so neither another model nor deletion may proceed.
+ let held = NativeWorkGate(), nextEntered = NativeWorkGate()
+ defer { held.finish.signal(); nextEntered.finish.signal() }
+ let (pendingChunks,pendingFeed) = AsyncThrowingStream<PCMChunk,any Error>.makeStream()
+ let pendingUpdates = try await engine.streamTranscribe(model: streaming,chunks: pendingChunks,progress: { value in
+ if value.stage == .running { held.run() }
+ })
+ let consumer = Task { for try await _ in pendingUpdates {} }
+ defer { consumer.cancel(); pendingFeed.finish() }
+ pendingFeed.yield(PCMChunk(samples: Array(audio.samples.prefix(4800)),sampleRate: audio.sampleRate))
+ let deadline = ContinuousClock.now + .seconds(10)
+ while held.count == 0 && ContinuousClock.now < deadline { try await Task.sleep(for: .milliseconds(5)) }
+ try #require(held.count == 1)
+ consumer.cancel(); _ = await consumer.result
+ let next = Task { try await engine.execute(tts,capability: .tts,progress: { _ in }) { _,_,_,_ in nextEntered.run(); return true } }
+ defer { next.cancel() }
+ try await Task.sleep(for: .milliseconds(150))
+ #expect(nextEntered.count == 0)
+ await #expect(throws: (any Error).self) { try await store.delete(streaming) }
+ held.finish.signal()
+ while nextEntered.count == 0 && ContinuousClock.now < deadline { try await Task.sleep(for: .milliseconds(5)) }
+ try #require(nextEntered.count == 1)
+ nextEntered.finish.signal()
+ #expect(try await next.value)
+
}
@Test(.enabled(if: ProcessInfo.processInfo.environment["VOICESTUDIO_REAL_NATIVE"] == "1"))
@@ -347,3 +377,126 @@ private struct LoopbackRangeTransport: HTTPTransport {
guard case .download = permissive.next(installed: [], accepted: []) else { Issue.record("Permissive model was gated"); return }
#expect(permissive.next(installed: [], accepted: []) == nil)
}
+
+private final class HashCounter: @unchecked Sendable {
+ private let lock = NSLock()
+ private var value = 0
+ var count: Int { lock.withLock { value } }
+ func hash(_ url: URL) throws -> String { lock.withLock { value += 1 }; return try ModelHash.file(url) }
+}
+@Test func reviewVerificationCachesInstallAndInvalidatesOnChangesAndNativeFailure() async throws {
+ let root = try localDirectory(); defer { try? FileManager.default.removeItem(at: root) }
+ let counter = HashCounter(), model = try localFixture()
+ let store = try ModelStore(root: root,fileHash: { try counter.hash($0) },available: { _ in 100_000_000 })
+ try await store.download(model,wifi: { true },transport: RangeServer(bytes: Data("model".utf8)))
+ #expect(counter.count == 1)
+ let path = try await store.authorize(model)
+ _ = try await store.authorize(model)
+ #expect(counter.count == 1)
+ try FileManager.default.setAttributes([.modificationDate: Date().addingTimeInterval(10)],ofItemAtPath: path.appendingPathComponent("model.bin").path)
+ _ = try await store.authorize(model)
+ #expect(counter.count == 2)
+ let changed = try localFixture(fingerprint: String(repeating: "d",count: 64))
+ _ = try await store.authorize(changed)
+ #expect(counter.count == 3)
+ let engine = NativeLocalEngine(store: store,libraries: [.sherpa: "/missing-runtime"])
+ await #expect(throws: (any Error).self) { try await engine.synthesize(model: changed,text: "Hello") }
+ _ = try await store.authorize(changed)
+ #expect(counter.count == 4)
+ let oldDate = try path.appendingPathComponent("model.bin").resourceValues(forKeys: [.contentModificationDateKey]).contentModificationDate!
+ try Data("other".utf8).write(to: path.appendingPathComponent("model.bin"))
+ try FileManager.default.setAttributes([.modificationDate: oldDate.addingTimeInterval(10)],ofItemAtPath: path.appendingPathComponent("model.bin").path)
+ await #expect(throws: (any Error).self) { try await store.authorize(changed) }
+ #expect(counter.count == 5)
+}
+@Test func reviewResumeSkipsVerifiedCompletedFileForStorage() async throws {
+ let root = try localDirectory(); defer { try? FileManager.default.removeItem(at: root) }
+ let bytes = Data("model".utf8), base = try localFixture(bytes: bytes)
+ var json = try JSONSerialization.jsonObject(with: JSONEncoder().encode(base)) as! [String: Any]
+ var files = json["files"] as! [[String: Any]]
+ var second = files[0]; second["path"] = "second.bin"; files.append(second)
+ json["files"] = files; json["total_bytes"] = bytes.count*2
+ let model = try ModelCatalogue.decode(JSONSerialization.data(withJSONObject: ["schema_version": 1,"models": [json]])).models[0]
+ let directory = root.appendingPathComponent(model.id); try PrivateFiles.directory(directory)
+ try bytes.write(to: directory.appendingPathComponent("model.bin"))
+ let store = try ModelStore(root: root,available: { _ in 16_777_216 + 5 }), host = RangeServer(bytes: bytes)
+ try await store.download(model,wifi: { true },transport: host)
+ #expect(await host.requests.count == 1)
+ #expect(await host.requests.first?.url?.lastPathComponent == "second.bin")
+ #expect(await store.installed(model))
+}
+@Test func reviewPCM16HandlesNonZeroDataStartIndex() throws {
+ let bytes = Data([99,99,0,128,255,127]).dropFirst(2)
+ #expect(bytes.startIndex == 2)
+ #expect(try PCMChunk(pcm16: bytes).samples == [-1,Float(32767)/32768])
+ #expect(throws: ClientError.self) { try PCMChunk(pcm16: bytes.dropFirst()) }
+}
+
+private final class NativeWorkGate: @unchecked Sendable {
+ let finish = DispatchSemaphore(value: 0)
+ private let lock = NSLock()
+ private var calls = 0
+ var count: Int { lock.withLock { calls } }
+ func run() { lock.withLock { calls += 1 }; finish.wait() }
+}
+@Test func reviewCancelledExecuteKeepsBothLeasesUntilWorkerCleanup() async throws {
+ let root = try localDirectory(); defer { try? FileManager.default.removeItem(at: root) }
+ let model = try localFixture(), store = try ModelStore(root: root,available: { _ in 100_000_000 })
+ try await store.download(model,wifi: { true },transport: RangeServer(bytes: Data("model".utf8)))
+ let engine = NativeLocalEngine(store: store), first = NativeWorkGate(), second = NativeWorkGate()
+ let work = Task { try await engine.execute(model,capability: .tts,progress: { _ in }) { _,_,_,_ in first.run(); return 1 } }
+ while first.count == 0 { try await Task.sleep(for: .milliseconds(5)) }
+ work.cancel()
+ let next = Task { try await engine.execute(model,capability: .tts,progress: { _ in }) { _,_,_,_ in second.run(); return 2 } }
+ try await Task.sleep(for: .milliseconds(150))
+ #expect(second.count == 0)
+ await #expect(throws: (any Error).self) { try await store.delete(model) }
+ first.finish.signal()
+ await #expect(throws: CancellationError.self) { try await work.value }
+ while second.count == 0 { try await Task.sleep(for: .milliseconds(5)) }
+ second.finish.signal()
+ #expect(try await next.value == 2)
+ try await store.delete(model)
+}
+
+@Test func reviewCompactErrorsRetainLocalizedRecoveryAndConnectionCause() throws {
+ let l10n = try L10n(locale: "en",catalogs: catalogs())
+ for key in ["wifi_required","storage_required","ram_required","licence_required","checksum_failed","runtime_failed","inference_failed"] {
+ let error = ClientError("mobile.local."+key,params: ["ram": "6"])
+ let presentation = ErrorPresentation(error,l10n: l10n)
+ #expect(presentation.title == l10n.t("mobile.simple.models_error"))
+ #expect(presentation.detail == l10n.t(error.key,error.params))
+ #expect(presentation.detail?.contains("{{") == false)
+ }
+ let active = ErrorPresentation(ClientError("sidebarTools.wait"),l10n: l10n)
+ #expect(active.detail == l10n.t("sidebarTools.wait"))
+ for key in ["mobile.connect.error_unreachable","mobile.connect.error_invalid_url","mobile.connect.error_api_key"] {
+ let presentation = ErrorPresentation(ClientError(key,params: ["host": "192.168.1.2"]),l10n: l10n,titleKey: "mobile.simple.connection_error")
+ #expect(presentation.detail == l10n.t(key,["host": "192.168.1.2"]))
+ #expect(presentation.detail?.contains("{{") == false)
+ }
+}
+
+@Test func reviewQueuedNativeWorkReverifiesAfterPriorNativeFailure() async throws {
+ let root = try localDirectory(); defer { try? FileManager.default.removeItem(at: root) }
+ let model = try localFixture(), store = try ModelStore(root: root,available: { _ in 100_000_000 })
+ try await store.download(model,wifi: { true },transport: RangeServer(bytes: Data("model".utf8)))
+ let path = try await store.authorize(model), held = NativeWorkGate(), engine = NativeLocalEngine(store: store)
+ defer { held.finish.signal() }
+ let first = Task { try await engine.execute(model,capability: .tts,progress: { _ in }) { _,_,_,_ -> Bool in
+ held.run(); throw ClientError("mobile.local.inference_failed")
+ } }
+ let deadline = ContinuousClock.now + .seconds(5)
+ while held.count == 0 && ContinuousClock.now < deadline { try await Task.sleep(for: .milliseconds(5)) }
+ try #require(held.count == 1)
+ let queued = Task { try await engine.execute(model,capability: .tts,progress: { _ in }) { _,_,_,_ in true } }
+ defer { first.cancel(); queued.cancel() }
+ try await Task.sleep(for: .milliseconds(100))
+ let file = path.appendingPathComponent("model.bin")
+ let modified = try file.resourceValues(forKeys: [.contentModificationDateKey]).contentModificationDate!
+ try Data("other".utf8).write(to: file)
+ try FileManager.default.setAttributes([.modificationDate: modified],ofItemAtPath: file.path)
+ held.finish.signal()
+ await #expect(throws: ClientError.self) { try await first.value }
+ await #expect(throws: ClientError("mobile.local.checksum_failed")) { try await queued.value }
+}
diff --git a/mobile/ios/VoiceStudioKit/Tests/VoiceStudioKitTests/PhoneWorkflowTests.swift b/mobile/ios/VoiceStudioKit/Tests/VoiceStudioKitTests/PhoneWorkflowTests.swift
index e6c230e75..948dcb7fc 100644
--- a/mobile/ios/VoiceStudioKit/Tests/VoiceStudioKitTests/PhoneWorkflowTests.swift
+++ b/mobile/ios/VoiceStudioKit/Tests/VoiceStudioKitTests/PhoneWorkflowTests.swift
@@ -1,11 +1,63 @@
import Foundation
import Testing
+@preconcurrency import AVFoundation
@testable import VoiceStudioKit
private func fixtureRoot() throws -> URL {
let root = FileManager.default.temporaryDirectory.appendingPathComponent("phone-workflow-"+UUID().uuidString)
try PrivateFiles.directory(root); return root
}
+
+@Test func phoneVideoMuxPreservesOrientationAndMarksPlayableAudio() async throws {
+ let root = try fixtureRoot(); defer { try? FileManager.default.removeItem(at: root) }
+ let source = root.appendingPathComponent("source.mp4")
+ let writer = try AVAssetWriter(outputURL: source, fileType: .mp4)
+ let input = AVAssetWriterInput(mediaType: .video, outputSettings: [
+ AVVideoCodecKey: AVVideoCodecType.h264, AVVideoWidthKey: 64, AVVideoHeightKey: 64
+ ])
+ input.transform = CGAffineTransform(rotationAngle: .pi / 2)
+ let adapter = AVAssetWriterInputPixelBufferAdaptor(assetWriterInput: input, sourcePixelBufferAttributes: [
+ kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32BGRA,
+ kCVPixelBufferWidthKey as String: 64, kCVPixelBufferHeightKey as String: 64
+ ])
+ try #require(writer.canAdd(input)); writer.add(input)
+ try #require(writer.startWriting()); writer.startSession(atSourceTime: .zero)
+ defer { if writer.status == .writing { writer.cancelWriting() } }
+ for frame in 0..<30 {
+ let deadline = ContinuousClock.now + .seconds(10)
+ while !input.isReadyForMoreMediaData && ContinuousClock.now < deadline {
+ try await Task.sleep(for: .milliseconds(5))
+ }
+ try #require(input.isReadyForMoreMediaData)
+ var buffer: CVPixelBuffer?
+ try #require(CVPixelBufferCreate(kCFAllocatorDefault, 64, 64, kCVPixelFormatType_32BGRA, nil, &buffer) == kCVReturnSuccess)
+ let pixels = try #require(buffer)
+ CVPixelBufferLockBaseAddress(pixels, [])
+ memset(CVPixelBufferGetBaseAddress(pixels), 0, CVPixelBufferGetDataSize(pixels))
+ CVPixelBufferUnlockBaseAddress(pixels, [])
+ try #require(adapter.append(pixels, withPresentationTime: CMTime(value: Int64(frame), timescale: 30)))
+ }
+ input.markAsFinished(); writer.endSession(atSourceTime: CMTime(seconds: 1, preferredTimescale: 30))
+ await writer.finishWriting(); try #require(writer.status == .completed)
+ let wave = root.appendingPathComponent("marked.wav")
+ try LocalAudio(samples: (0..<24000).map { Float(sin(Double($0) * 2 * .pi * 440 / 24000) * 0.3) }, sampleRate: 24000).markSynthetic().write(to: wave)
+ let result = try await AVPhoneDubMedia().finish(source: source, markedWave: wave, output: root.appendingPathComponent("dub"), audioOnly: false, progress: { _ in })
+ let asset = AVURLAsset(url: result)
+ let video = try #require(try await asset.loadTracks(withMediaType: .video).first)
+ #expect(try await asset.loadTracks(withMediaType: .audio).count == 1)
+ let transform = try await video.load(.preferredTransform)
+ #expect(abs(transform.b - 1) < 0.001 && abs(transform.c + 1) < 0.001)
+ #expect(abs(try await asset.load(.duration).seconds - 1) < 0.1)
+ let metadata = try await asset.load(.commonMetadata)
+ var marked = false
+ for item in metadata where item.commonKey == .commonKeyDescription {
+ if try await item.load(.stringValue) == "VoiceStudio synthetic audio" { marked = true }
+ }
+ #expect(marked)
+ let decoded = try await AVPhoneAudioDecoder().decode(source: result, output: root.appendingPathComponent("decoded.pcm"), maxSeconds: 5, progress: { _ in })
+ #expect(try decoded.frames >= 21600)
+ #expect(try decoded.read(start: 0, count: min(24000, decoded.frames)).samples.contains { abs($0) > 0.01 })
+}
private func fixtureModel(_ capability: ModelCapability) throws -> PhoneModel {
try ModelCatalogue.decode(Data(contentsOf: repository.appendingPathComponent("mobile/contract/models.json"))).models.first { $0.capability == capability }!
}
@@ -225,3 +277,48 @@ func realAuxiliaryPhoneDubOfflineAndResume() async throws {
#expect(!FileManager.default.fileExists(atPath: pending.path))
}
}
+
+@Test func reviewBlankDubReferenceFallsBackAndRepairsSavedBlank() async throws {
+ let root = try fixtureRoot(); defer { try? FileManager.default.removeItem(at: root) }
+ let source = root.appendingPathComponent("source.wav"); try Data("fixture".utf8).write(to: source)
+ let models = try [fixtureModel(.asr),fixtureModel(.translate),fixtureModel(.clone)]
+ let store = try PhoneDubStore(root: root.appendingPathComponent("dubs")), engine = FixtureEngine()
+ await engine.empty(); await engine.failOnClone(2)
+ let request = try await store.create(source: source,title: "Source",targets: [PhoneDubTarget(code: "fr",name: "French")],models: models,consent: true,audioOnly: true)
+ let pipeline = PhoneDubPipeline(store: store,engine: engine,decoder: FixtureDecoder(),media: FixtureMedia())
+ await #expect(throws: CancellationError.self) { try await pipeline.run(id: request.id,models: models) }
+ var checkpoint = try await store.checkpoint(request.id)
+ #expect(checkpoint.segments.first?.referenceText == "Hello")
+ if checkpoint.segments.count > 1 { checkpoint.segments[1].referenceText = " \n"; try await store.save(request.id,checkpoint) }
+ let result = try await pipeline.run(id: request.id,models: models)
+ #expect(result.done)
+ #expect(result.segments.map(\.referenceText) == ["Hello","World"])
+}
+
+@Test func reviewCorruptRecordsDoNotHideHealthyLibraries() async throws {
+ let root = try fixtureRoot(); defer { try? FileManager.default.removeItem(at: root) }
+ let voicesRoot = root.appendingPathComponent("voices"), dubsRoot = root.appendingPathComponent("dubs")
+ let voices = try PhoneVoiceStore(root: voicesRoot), dubs = try PhoneDubStore(root: dubsRoot)
+ let recentRoot = root.appendingPathComponent("recent"), recent = try PhoneGenerationStore(root: recentRoot)
+ let voice = try await voices.create(name: "Voice",source: root,consent: true,asr: fixtureModel(.asr),engine: FixtureEngine(),decoder: FixtureDecoder())
+ let source = root.appendingPathComponent("source.wav"); try Data("fixture".utf8).write(to: source)
+ let request = try await dubs.create(source: source,title: "Source",targets: [PhoneDubTarget(code: "fr",name: "French")],models: [fixtureModel(.asr),fixtureModel(.translate),fixtureModel(.clone)],consent: true)
+ let generation = try await recent.save(text: "Hello",audio: LocalAudio(samples: [0.2],sampleRate: 24000))
+ for (directory,metadata) in [(voicesRoot,"voice.json"),(dubsRoot,"request.json")] {
+ let bad = directory.appendingPathComponent(UUID().uuidString); try PrivateFiles.directory(bad)
+ try Data("broken".utf8).write(to: bad.appendingPathComponent(metadata))
+ }
+ try Data("broken".utf8).write(to: recentRoot.appendingPathComponent("broken.json"))
+ #expect(try await voices.list() == [voice])
+ #expect(try await dubs.list().map(\.id) == [request.id])
+ #expect(try await recent.list().map(\.id) == [generation.id])
+}
+
+@Test func reviewReferenceDecodeCapsAcceptedDurationTolerance() async throws {
+ let root = try fixtureRoot(); defer { try? FileManager.default.removeItem(at: root) }
+ let source = root.appendingPathComponent("recorded.wav")
+ try LocalAudio(samples: Array(repeating: 0.2,count: 720120),sampleRate: 24000).markSynthetic().write(to: source)
+ let store = try PhoneVoiceStore(root: root.appendingPathComponent("voices"))
+ let voice = try await store.create(name: "Voice",source: source,consent: true,asr: fixtureModel(.asr),engine: FixtureEngine(),decoder: AVPhoneAudioDecoder())
+ #expect(try await store.reference(voice).samples.count == 720000)
+}
diff --git a/mobile/ios/VoiceStudioUITests/HomeScreens.swift b/mobile/ios/VoiceStudioUITests/HomeScreens.swift
new file mode 100644
index 000000000..a952fa76e
--- /dev/null
+++ b/mobile/ios/VoiceStudioUITests/HomeScreens.swift
@@ -0,0 +1,28 @@
+import XCTest
+
+final class HomeScreens: XCTestCase {
+ @MainActor func testHomeStartsOfflineAndOpensEveryWorkspace() {
+ let app = XCUIApplication(); app.launchArguments = ["--ui-smoke", "-AppleLanguages", "(en)"]
+ app.launch(); XCTAssertTrue(app.buttons["consent.no"].waitForExistence(timeout: 10)); app.buttons["consent.no"].tap()
+ XCTAssertTrue(app.navigationBars["Home"].waitForExistence(timeout: 5))
+ XCTAssertTrue(app.staticTexts["VoiceStudio.sh Open Source"].exists)
+ let attachment = XCTAttachment(screenshot: app.screenshot()); attachment.name = "Home-dark"; attachment.lifetime = .keepAlways; add(attachment)
+ for (route, title) in [("speak","Speak"),("voices","Voices"),("dub","Dub"),("dictate","Dictate"),("models","Models"),("connect","Connect to VoiceStudio")] {
+ let card = app.buttons["home."+route]
+ for _ in 0..<5 { if card.isHittable { break }; app.swipeUp() }
+ XCTAssertTrue(card.isHittable, route); card.tap()
+ XCTAssertTrue(app.navigationBars[title].waitForExistence(timeout: 5), route)
+ if app.buttons["BackButton"].exists { app.buttons["BackButton"].tap() }
+ else { app.navigationBars.buttons.element(boundBy: 0).tap() }
+ }
+ for _ in 0..<5 { if app.staticTexts["Your generations will appear here."].isHittable { break }; app.swipeUp() }
+ XCTAssertTrue(app.staticTexts["Your generations will appear here."].exists)
+ XCTAssertTrue(app.staticTexts["No projects yet"].exists)
+ app.tabButton("Settings").tap()
+ app.buttons["Mode"].tap(); app.buttons["choice.option.light"].tap()
+ app.tabButton("Home").tap()
+ for _ in 0..<5 { if app.buttons["home.speak"].isHittable { break }; app.swipeDown() }
+ let light = XCTAttachment(screenshot: app.screenshot()); light.name = "Home-light"; light.lifetime = .keepAlways; add(light)
+ app.buttons["home.speak"].tap(); XCTAssertTrue(app.textViews["speak.text"].waitForExistence(timeout: 5))
+ }
+}
diff --git a/mobile/ios/VoiceStudioUITests/PhoneScreens.swift b/mobile/ios/VoiceStudioUITests/PhoneScreens.swift
index 3edc00b2d..0d0be604a 100644
--- a/mobile/ios/VoiceStudioUITests/PhoneScreens.swift
+++ b/mobile/ios/VoiceStudioUITests/PhoneScreens.swift
@@ -4,19 +4,33 @@ final class PhoneScreens: XCTestCase {
@MainActor private func launch(extra: [String] = []) -> XCUIApplication {
let app = XCUIApplication(); app.launchArguments = ["--ui-smoke","-AppleLanguages","(en)"] + extra
app.launch(); XCTAssertTrue(app.buttons["consent.no"].waitForExistence(timeout: 10)); app.buttons["consent.no"].tap()
+ app.openSpeak()
return app
}
@MainActor func testRememberedComputerChoiceFallsBackWhileUnpaired() {
let app = launch(extra: ["-run-on.speak","computer","-run-on.clone","computer","-run-on.dub","computer"])
XCTAssertTrue(app.buttons["models.get"].exists)
- app.tabBars.buttons["Voices"].tap(); app.buttons["voices.create"].tap()
+ app.tabButton("Voices").tap(); app.buttons["voices.create"].tap()
XCTAssertTrue(app.buttons["models.get"].waitForExistence(timeout: 5)); app.buttons["Cancel"].tap()
- app.tabBars.buttons["Dub"].tap()
+ app.tabButton("Dub").tap()
XCTAssertTrue(app.staticTexts["1 Source"].waitForExistence(timeout: 5))
XCTAssertFalse(app.textFields["dub.source_url"].exists)
}
+ @MainActor func testChangingSpeechModelResetsUnavailablePreset() {
+ let app = launch()
+ app.buttons["Models"].tap(); app.buttons["choice.option.kokoro-multi-int8"].tap()
+ app.buttons["Voice"].tap()
+ let search = app.textFields.firstMatch
+ XCTAssertTrue(search.waitForExistence(timeout: 5)); search.tap(); search.typeText("Voice 103")
+ app.buttons["choice.option.102"].tap()
+ XCTAssertEqual(app.buttons["Voice"].value as? String,"Voice 103")
+ app.buttons["Models"].tap(); app.buttons["choice.option.kitten-mini-en-fp16"].tap()
+ app.buttons["Voice"].tap()
+ XCTAssertEqual(app.buttons["choice.option.0"].value as? String,"Selected")
+ XCTAssertFalse(app.buttons["choice.option.102"].exists)
+ }
@MainActor func testUnpairedCloneShowsModelGateAndConsent() {
- let app = launch(); app.tabBars.buttons["Voices"].tap(); app.buttons["voices.create"].tap()
+ let app = launch(); app.tabButton("Voices").tap(); app.buttons["voices.create"].tap()
XCTAssertTrue(app.textFields["voices.clone.name"].waitForExistence(timeout: 5))
XCTAssertTrue(app.buttons["models.get"].exists)
XCTAssertTrue(app.switches["I have permission"].exists)
@@ -24,7 +38,7 @@ final class PhoneScreens: XCTestCase {
XCTAssertFalse(app.staticTexts["This task currently runs on your paired computer."].exists)
}
@MainActor func testUnpairedDubHasSourceLanguagesAndVoiceSteps() {
- let app = launch(); app.tabBars.buttons["Dub"].tap()
+ let app = launch(); app.tabButton("Dub").tap()
for step in ["1 Source","2 Languages","3 Voice"] { XCTAssertTrue(app.staticTexts[step].waitForExistence(timeout: 5)) }
XCTAssertTrue(app.buttons["Choose video or audio"].exists)
XCTAssertTrue(app.buttons["dub.languages"].exists)
@@ -33,7 +47,7 @@ final class PhoneScreens: XCTestCase {
XCTAssertTrue(app.staticTexts["No dubs"].exists)
}
@MainActor func testModelsTermsRequireExplicitUncheckedConsent() {
- let app = launch(); app.tabBars.buttons["Settings"].tap(); app.buttons["Models"].tap()
+ let app = launch(); app.tabButton("Settings").tap(); app.buttons["Models"].tap()
let licence = app.buttons["model.licence.kitten-mini-en-fp16"]
XCTAssertTrue(licence.waitForExistence(timeout: 5)); licence.tap()
let accept = app.buttons["models.accept"]
@@ -53,23 +67,26 @@ final class PhoneScreens: XCTestCase {
XCTAssertFalse(app.buttons["models.accept"].isEnabled)
for _ in 0..<15 { if app.buttons["Decline"].isHittable { break }; app.swipeUp() }
app.buttons["Decline"].tap()
- app.tabBars.buttons["Voices"].tap()
+ app.tabButton("Voices").tap()
XCTAssertFalse(app.buttons["whisper-tiny-int8"].exists)
- app.tabBars.buttons["Dub"].tap()
+ app.tabButton("Dub").tap()
XCTAssertEqual(app.buttons.matching(identifier: "models.get").count, 1)
XCTAssertTrue(app.buttons["models.open"].label.contains("3 downloads"))
XCTAssertFalse(app.staticTexts["NOASSERTION"].exists)
XCTAssertFalse(app.navigationBars.buttons["Settings"].exists)
}
@MainActor func testPaletteSelectionAndDictationActionsClearTheTabBar() {
- let app = launch(); app.tabBars.buttons["Dictate"].tap()
- let bar = app.tabBars.firstMatch
+ let app = launch(); app.tabButton("Dictate").tap()
+ let navigation = ["Home", "Voices", "Dub", "Dictate", "Settings"].map { app.tabButton($0) }
for identifier in ["dictate.copy", "dictate.share"] {
let action = app.buttons[identifier]
XCTAssertTrue(action.exists)
- XCTAssertLessThanOrEqual(action.frame.maxY, bar.frame.minY)
+ for tab in navigation {
+ XCTAssertTrue(tab.exists)
+ XCTAssertFalse(action.frame.intersects(tab.frame), "Dictation action overlaps navigation")
+ }
}
- app.tabBars.buttons["Settings"].tap()
+ app.tabButton("Settings").tap()
app.buttons["mobile.settings.light_palette"].tap()
let studio = app.buttons["choice.option.default"]
XCTAssertTrue(studio.waitForExistence(timeout: 5)); XCTAssertEqual(studio.value as? String, "Selected")
@@ -78,7 +95,7 @@ final class PhoneScreens: XCTestCase {
XCTAssertEqual(app.buttons["choice.option.canopy"].value as? String, "Selected")
}
@MainActor func testConnectAndPrivacyKeepDetailsCollapsed() {
- let app = launch(); app.tabBars.buttons["Settings"].tap()
+ let app = launch(); app.tabButton("Settings").tap()
XCTAssertFalse(app.staticTexts.containing(NSPredicate(format: "label BEGINSWITH %@","On-device tasks send nothing")).firstMatch.exists)
app.buttons["settings.connect"].tap()
XCTAssertTrue(app.buttons["Scan QR code"].exists)
@@ -96,28 +113,31 @@ final class ScreenshotTour: XCTestCase {
}
@MainActor func testPhoneFirstScreens() {
let app = XCUIApplication(); app.launchArguments = ["--ui-smoke","-AppleLanguages","(en)"]
- app.launch(); XCTAssertTrue(app.buttons["consent.no"].waitForExistence(timeout: 10)); XCTAssertTrue(app.staticTexts["Saved on this phone. Nothing is sent."].exists); capture("Consent",app); app.buttons["consent.no"].tap()
+ app.launch(); XCTAssertTrue(app.buttons["consent.no"].waitForExistence(timeout: 10)); XCTAssertTrue(app.staticTexts["Saved on this phone. Nothing is sent."].exists); capture("Consent",app); app.buttons["consent.no"].tap(); capture("Home",app); app.openSpeak()
XCTAssertTrue(app.textViews["speak.text"].waitForExistence(timeout: 5)); capture("Speak-phone",app)
- app.tabBars.buttons["Voices"].tap(); capture("Voices-phone",app)
+ app.tabButton("Voices").tap(); capture("Voices-phone",app)
app.buttons["voices.create"].tap(); XCTAssertTrue(app.textFields["voices.clone.name"].waitForExistence(timeout: 5)); capture("Clone-phone",app); app.buttons["Cancel"].tap()
- app.tabBars.buttons["Dub"].tap(); XCTAssertEqual(app.buttons.matching(identifier: "models.get").count, 1); capture("Dub-phone",app)
- app.tabBars.buttons["Dictate"].tap(); capture("Dictate-phone",app)
- app.tabBars.buttons["Settings"].tap(); capture("Settings",app)
+ app.tabButton("Dub").tap(); XCTAssertEqual(app.buttons.matching(identifier: "models.get").count, 1); capture("Dub-phone",app)
+ app.tabButton("Dictate").tap(); capture("Dictate-phone",app)
+ app.tabButton("Settings").tap(); capture("Settings",app)
app.buttons["mobile.settings.light_palette"].tap()
XCTAssertTrue(app.buttons["choice.option.default"].waitForExistence(timeout: 5)); capture("Palette-picker",app); app.buttons["Close"].tap()
app.buttons["Language"].tap(); capture("Language-picker",app); app.buttons["Close"].tap()
app.buttons["Models"].tap(); capture("Models",app)
app.buttons["model.licence.kitten-mini-en-fp16"].tap(); capture("Model-terms",app); app.buttons["Close"].tap()
- app.navigationBars.buttons.firstMatch.tap(); app.buttons["settings.connect"].tap(); capture("Connect",app)
+ let adaptiveBack = app.buttons["BackButton"]
+ if adaptiveBack.exists { adaptiveBack.tap() } else { app.navigationBars.buttons.firstMatch.tap() }
+ XCTAssertTrue(app.buttons["settings.connect"].waitForExistence(timeout: 5))
+ app.buttons["settings.connect"].tap(); capture("Connect",app)
app.buttons["Enter address"].tap(); capture("Connect-address",app)
}
@MainActor func testPairedComputerScreens() {
let app = XCUIApplication(); app.launchArguments = ["--ui-smoke","-AppleLanguages","(en)"]
app.launch(); XCTAssertTrue(app.buttons["consent.no"].waitForExistence(timeout: 10)); app.buttons["consent.no"].tap()
- app.tabBars.buttons["Settings"].tap(); app.buttons["settings.connect"].tap(); app.buttons["Enter address"].tap()
+ app.tabButton("Settings").tap(); app.buttons["settings.connect"].tap(); app.buttons["Enter address"].tap()
let address = app.textFields["connect.url"]; address.tap(); address.typeText("http://127.0.0.1:3900")
- app.buttons["keyboard.done"].tap(); app.buttons["connect.submit"].tap()
+ app.buttons["keyboard.done"].tap(); app.buttons["connect.submit"].tap(); app.openSpeak()
XCTAssertTrue(app.textViews["speak.text"].waitForExistence(timeout: 10)); capture("Speak-computer",app)
- for tab in ["Voices","Dub","Dictate"] { app.tabBars.buttons[tab].tap(); capture(tab+"-computer",app) }
+ for tab in ["Voices","Dub","Dictate"] { app.tabButton(tab).tap(); capture(tab+"-computer",app) }
}
}
diff --git a/mobile/ios/VoiceStudioUITests/SmokeTests.swift b/mobile/ios/VoiceStudioUITests/SmokeTests.swift
index aebce4a74..4fed29c43 100644
--- a/mobile/ios/VoiceStudioUITests/SmokeTests.swift
+++ b/mobile/ios/VoiceStudioUITests/SmokeTests.swift
@@ -1,5 +1,26 @@
import XCTest
+extension XCUIApplication {
+ /// Native TabView can expose either a bottom tab bar or an adaptive side rail.
+ @MainActor func tabButton(_ label: String) -> XCUIElement {
+ let tab = tabBars.buttons[label]
+ if tab.exists { return tab }
+ let symbols = ["Home": "house", "Voices": "person.wave.2", "Dub": "film", "Dictate": "mic", "Settings": "gearshape"]
+ return buttons.matching(NSPredicate(format: "label == %@ AND identifier == %@", label, symbols[label] ?? label)).firstMatch
+ }
+ @MainActor func openSpeak() {
+ tabButton("Home").tap()
+ if textViews["speak.text"].exists { return }
+ for _ in 0..<5 {
+ if buttons["home.speak"].exists { break }
+ if buttons["BackButton"].exists { buttons["BackButton"].tap() }
+ else { navigationBars.buttons.element(boundBy: 0).tap() }
+ }
+ buttons["home.speak"].tap()
+ }
+
+}
+
final class SmokeTests: XCTestCase {
@MainActor func testUnpairedTabsAndModelDownloadPrompt() throws {
let app = XCUIApplication()
@@ -7,10 +28,11 @@ final class SmokeTests: XCTestCase {
app.launch()
XCTAssertTrue(app.buttons["consent.no"].waitForExistence(timeout: 10))
app.buttons["consent.no"].tap()
+ app.openSpeak()
XCTAssertTrue(app.textViews["speak.text"].waitForExistence(timeout: 5))
- XCTAssertTrue(app.buttons["Open Models"].exists)
+ XCTAssertTrue(app.buttons["models.open"].exists)
for tab in ["Voices", "Dub", "Dictate", "Settings"] {
- app.tabBars.buttons[tab].tap()
+ app.tabButton(tab).tap()
XCTAssertTrue(app.navigationBars[tab].waitForExistence(timeout: 2))
}
XCTAssertTrue(app.buttons["settings.connect"].exists)
@@ -23,13 +45,13 @@ final class SmokeTests: XCTestCase {
connect(app)
XCTAssertTrue(app.textViews["speak.text"].waitForExistence(timeout: 5))
XCTAssertTrue(app.descendants(matching: .any)["page.loading"].firstMatch.exists)
- app.tabBars.buttons["Dub"].tap()
+ app.tabButton("Dub").tap()
XCTAssertTrue(app.textFields["dub.source_url"].waitForExistence(timeout: 0.5))
- app.tabBars.buttons["Voices"].tap()
+ app.tabButton("Voices").tap()
XCTAssertTrue(app.buttons["voices.create"].waitForExistence(timeout: 0.5))
- app.tabBars.buttons["Dictate"].tap()
+ app.tabButton("Dictate").tap()
XCTAssertTrue(app.buttons["dictate.record"].waitForExistence(timeout: 0.5))
- app.tabBars.buttons["Settings"].tap()
+ app.tabButton("Settings").tap()
XCTAssertTrue(app.buttons["settings.language"].waitForExistence(timeout: 0.5))
}
@@ -39,20 +61,20 @@ final class SmokeTests: XCTestCase {
app.launch()
connect(app)
XCTAssertTrue(app.textViews["speak.text"].waitForExistence(timeout: 5))
- app.tabBars.buttons["Voices"].tap()
+ app.tabButton("Voices").tap()
let search = app.textFields["search.field"]
XCTAssertTrue(search.waitForExistence(timeout: 5))
search.tap(); search.typeText("unmatched-voice")
XCTAssertTrue(app.staticTexts["search.empty"].exists)
XCTAssertEqual(app.staticTexts["search.empty"].label, "No matches for \"unmatched-voice\".")
dismissUsingDone(app)
- app.tabBars.buttons["Speak"].tap()
+ app.openSpeak()
app.buttons["speak.engine"].tap()
search.tap(); search.typeText("unmatched-engine")
XCTAssertTrue(app.staticTexts["search.empty"].exists)
dismissUsingDone(app)
app.buttons["Close"].tap()
- app.tabBars.buttons["Dub"].tap()
+ app.tabButton("Dub").tap()
app.buttons["dub.languages"].tap()
search.tap(); search.typeText("unmatched-language")
XCTAssertTrue(app.staticTexts["search.empty"].exists)
@@ -71,7 +93,7 @@ final class SmokeTests: XCTestCase {
@MainActor private func connect(_ app: XCUIApplication) {
XCTAssertTrue(app.buttons["consent.no"].waitForExistence(timeout: 10))
app.buttons["consent.no"].tap()
- app.tabBars.buttons["Settings"].tap()
+ app.tabButton("Settings").tap()
app.buttons["settings.connect"].tap()
app.buttons["Enter address"].tap()
let address = app.textFields["connect.url"]
@@ -80,6 +102,7 @@ final class SmokeTests: XCTestCase {
dismissUsingDone(app)
app.swipeUp()
app.buttons["connect.submit"].tap()
+ app.openSpeak()
}
@MainActor func testConsentConnectGeneratePlay() throws {
@@ -88,8 +111,8 @@ final class SmokeTests: XCTestCase {
app.launch()
XCTAssertTrue(app.buttons["consent.no"].waitForExistence(timeout: 10))
app.buttons["consent.no"].tap()
- XCTAssertTrue(app.tabBars.buttons["Speak"].exists)
- app.tabBars.buttons["Settings"].tap()
+ XCTAssertTrue(app.tabButton("Home").exists)
+ app.tabButton("Settings").tap()
app.buttons["settings.connect"].tap()
app.buttons["Enter address"].tap()
let address = app.textFields["connect.url"]
@@ -98,6 +121,7 @@ final class SmokeTests: XCTestCase {
dismissUsingDone(app)
app.swipeUp()
app.buttons["connect.submit"].tap()
+ app.openSpeak()
let editor = app.textViews["speak.text"]
XCTAssertTrue(editor.waitForExistence(timeout: 10))
XCTAssertEqual(app.alerts.count, 0)
@@ -142,7 +166,7 @@ final class SmokeTests: XCTestCase {
app.launch()
XCTAssertTrue(app.buttons["consent.no"].waitForExistence(timeout: 10))
app.buttons["consent.no"].tap()
- app.tabBars.buttons["Settings"].tap()
+ app.tabButton("Settings").tap()
app.buttons["settings.connect"].tap()
app.buttons["Enter address"].tap()
let address = app.textFields["connect.url"]
@@ -156,6 +180,7 @@ final class SmokeTests: XCTestCase {
assertKeyboardDismissed(app)
app.swipeUp()
app.buttons["connect.submit"].tap()
+ app.openSpeak()
let editor = app.textViews["speak.text"]
XCTAssertTrue(editor.waitForExistence(timeout: 10))
editor.tap(); editor.typeText("An editable multiline message\nwith a second line")
@@ -163,7 +188,7 @@ final class SmokeTests: XCTestCase {
app.swipeUp()
XCTAssertTrue(app.buttons["speak.generate"].isHittable)
- app.tabBars.buttons["Voices"].tap()
+ app.tabButton("Voices").tap()
app.buttons["voices.actions.smoke-profile"].tap()
app.buttons["Rename"].tap()
let rename = app.textFields["voices.rename.name"]
@@ -178,13 +203,13 @@ final class SmokeTests: XCTestCase {
dismissUsingDone(app)
app.buttons["Cancel"].tap()
- app.tabBars.buttons["Dub"].tap()
+ app.tabButton("Dub").tap()
let source = app.textFields["dub.source_url"]
XCTAssertTrue(source.waitForExistence(timeout: 5))
source.tap(); source.typeText("https://media.example/sample\n")
assertKeyboardDismissed(app)
- app.tabBars.buttons["Settings"].tap()
+ app.tabButton("Settings").tap()
let language = app.buttons["settings.language"]
for _ in 0..<5 {
if language.isHittable { break }
diff --git a/mobile/ios/scripts/prepare_resources.py b/mobile/ios/scripts/prepare_resources.py
index 846ad54cc..72cdca6b5 100644
--- a/mobile/ios/scripts/prepare_resources.py
+++ b/mobile/ios/scripts/prepare_resources.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
"""Copy authoritative catalogs; localize OS permission prompts; derive version from root."""
import argparse
+import hashlib
import json
import pathlib
import plistlib
@@ -22,6 +23,11 @@ def prepare_brand_assets(output):
subprocess.run(["xcrun", "swiftc", "-module-cache-path", str(cache / "modules"), str(source), "-o", str(renderer)], check=True)
subprocess.run([str(renderer), str(ROOT / "docs/logo.png"), str(ROOT / "mobile/contract/tokens.json"), str(output)], check=True)
+ artwork = output / "HomeArtwork.imageset"
+ artwork.mkdir(parents=True, exist_ok=True)
+ subprocess.run(["sips", "-s", "format", "png", str(ROOT / "electron/public/signal-field.webp"), "--out", str(artwork / "artwork.png")], check=True, stdout=subprocess.DEVNULL)
+ (artwork / "Contents.json").write_text(json.dumps({"images": [{"filename": "artwork.png", "idiom": "universal"}], "info": {"version": 1, "author": "xcode"}}))
+
def merge(base, addition):
for key, value in addition.items():
@@ -38,8 +44,30 @@ def lookup(catalog, key):
return value if isinstance(value, str) else None
+def validate_native_notices(directory, pins):
+ manifest = json.loads((directory / "sources.json").read_text())
+ expected = {"sherpa-onnx", "omnivoice.cpp", "omnivoice-ggml", "llama.cpp", "llama-ggml",
+ "espeak-ng-for-piper", "piper-phonemize", "kaldi-native-fbank", "kissfft",
+ "kaldi-decoder", "kaldifst", "openfst", "simple-sentencepiece", "json", "hclust-cpp", "eigen", "onnxruntime"}
+ if {entry["name"] for entry in manifest} != expected:
+ raise ValueError("Native licence set is incomplete; run mobile/native/ios/prepare-notices.py")
+ for entry in manifest:
+ text = (directory / (entry["name"] + ".txt")).read_bytes()
+ if hashlib.sha256(text).hexdigest() != entry["notice_sha256"]:
+ raise ValueError("Native licence changed: " + entry["name"])
+ if entry["name"] in pins:
+ pin = pins[entry["name"]]["source"]
+ if entry["source"] != pin["repo"] + "/tree/" + pin["commit"]:
+ raise ValueError("Native licence pin drift: " + entry["name"])
+ if not (directory / "Corresponding-source.txt").is_file():
+ raise ValueError("Missing GPL corresponding sources")
+
+
def prepare(output, info):
output.mkdir(parents=True, exist_ok=True)
+ legal = IOS / "VoiceStudio/Resources/NativeLicences"
+ validate_native_notices(legal,json.loads((ROOT / "mobile/native/pins.json").read_text()))
+ shutil.copytree(legal,output / "NativeLicences",dirs_exist_ok=True)
notices = ROOT / "mobile/native/ios/build/xcframeworks/Notices"
if notices.is_dir():
shutil.copytree(notices, output / "NativeLicences", dirs_exist_ok=True)
diff --git a/mobile/ios/scripts/simulator-inference.py b/mobile/ios/scripts/simulator-inference.py
new file mode 100644
index 000000000..d38593dce
--- /dev/null
+++ b/mobile/ios/scripts/simulator-inference.py
@@ -0,0 +1,71 @@
+#!/usr/bin/env python3
+"""Run linked iOS engines sequentially on an isolated simulator with provisioned models."""
+import argparse
+import json
+from pathlib import Path
+import plistlib
+import subprocess
+import tempfile
+
+IOS = Path(__file__).resolve().parents[1]
+TESTS = [
+ 'realNativePinnedRuntimesAreLoadable',
+ 'phoneVideoMuxPreservesOrientationAndMarksPlayableAudio',
+ 'realSherpaSynthesizesAndTranscribesOffline',
+ 'realAuxiliaryCloneAndTranslation',
+ 'realAuxiliaryPhoneVoiceCreationAndSpeak',
+ 'realAuxiliaryPhoneDubOfflineAndResume',
+]
+
+
+def run(*args):
+ subprocess.run([str(arg) for arg in args], check=True)
+
+
+def main():
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument('--device', required=True, help='Booted validation simulator UDID')
+ parser.add_argument('--derived-data', type=Path, default=IOS / '.cache/simulator-inference')
+ parser.add_argument('--test', choices=TESTS, action='append', help='Run only selected tests')
+ args = parser.parse_args()
+ if not (IOS / '.cache/inference-models/acceptance.json').is_file():
+ parser.error('Provision test models and explicitly accept their licences first; see README.md')
+ derived = args.derived_data.resolve()
+ destination = 'platform=iOS Simulator,id=' + args.device
+ run('xcodegen', 'generate', '--spec', IOS / 'VoiceStudio/project.yml')
+ run('xcodebuild', '-project', IOS / 'VoiceStudio/VoiceStudio.xcodeproj',
+ '-scheme', 'VoiceStudioNative', '-destination', destination,
+ '-derivedDataPath', derived, 'CODE_SIGNING_ALLOWED=NO', 'build-for-testing')
+ products = derived / 'Build/Products'
+ candidates = list(products.glob('VoiceStudioNative_*.xctestrun'))
+ if len(candidates) != 1:
+ raise RuntimeError(f'Expected one native test run, found {len(candidates)}; use clean derived data')
+ results = Path(tempfile.mkdtemp(prefix='native-results-', dir=derived))
+ empty_hf_cache = results / 'hf-empty'
+ empty_hf_cache.mkdir()
+ config = plistlib.loads(candidates[0].read_bytes())
+ config['VoiceStudioKitTests'].setdefault('EnvironmentVariables', {}).update({
+ 'VOICESTUDIO_REAL_INFERENCE': '1', 'VOICESTUDIO_REAL_AUX': '1',
+ 'VOICESTUDIO_REAL_NATIVE': '1', 'SHERPA_ONNX_LIBRARY': 'linked',
+ 'OMNIVOICE_LIBRARY': 'linked', 'LLAMA_LIBRARY': 'linked',
+ 'HF_HUB_OFFLINE': '1', 'HF_HUB_CACHE': str(empty_hf_cache),
+ })
+ # Keep beside the generated run: its __TESTROOT__ is relative to this file.
+ configured = products / 'VoiceStudioNative-real.xctestrun'
+ configured.write_bytes(plistlib.dumps(config))
+ print(f'Results: {results}', flush=True)
+ for test in args.test or TESTS:
+ result = results / (test + '.xcresult')
+ run('xcodebuild', 'test-without-building', '-xctestrun', configured,
+ '-destination', destination, '-parallel-testing-enabled', 'NO',
+ '-only-testing:VoiceStudioKitTests/' + test + '()', '-resultBundlePath', result)
+ summary = json.loads(subprocess.check_output([
+ 'xcrun', 'xcresulttool', 'get', 'test-results', 'summary', '--path', str(result), '--format', 'json'
+ ]))
+ if (summary['totalTestCount'], summary['passedTests'], summary['failedTests'], summary['skippedTests']) != (1, 1, 0, 0):
+ raise RuntimeError(f'{test} did not execute and pass exactly once: {summary}')
+ print(f'PASS {test}', flush=True)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/mobile/ios/scripts/test_resources.py b/mobile/ios/scripts/test_resources.py
index 34a637369..81777afb4 100644
--- a/mobile/ios/scripts/test_resources.py
+++ b/mobile/ios/scripts/test_resources.py
@@ -68,6 +68,25 @@ class BrandResources(unittest.TestCase):
self.assertEqual(info["NSMicrophoneUsageDescription"], expected)
self.assertIn(json.dumps(expected), (self.root / "bundle/en.lproj/InfoPlist.strings").read_text())
+ def test_native_licences_are_bundled_without_xcode_artifacts(self):
+ legal = self.root / "bundle/NativeLicences"
+ entries = json.loads((legal / "sources.json").read_text())
+ names = {entry["name"] for entry in entries}
+ self.assertTrue({"espeak-ng-for-piper", "piper-phonemize", "kaldi-native-fbank",
+ "kissfft", "kaldifst", "eigen", "llama.cpp", "llama-ggml",
+ "omnivoice.cpp", "omnivoice-ggml"} <= names)
+ self.assertIn("GNU GENERAL PUBLIC LICENSE", (legal / "espeak-ng-for-piper.txt").read_text())
+ corresponding = (legal / "Corresponding-source.txt").read_text()
+ self.assertIn("ed530aa113046142eb5115cf2fc9157854d0ffe1", corresponding)
+ for entry in entries:
+ self.assertIn(entry["source"], corresponding)
+ pins = json.loads((resources.ROOT / "mobile/native/pins.json").read_text())
+ resources.validate_native_notices(legal,pins)
+ (legal / "llama.cpp.txt").write_text("broken")
+ with self.assertRaisesRegex(ValueError,"Native licence changed"):
+ resources.validate_native_notices(legal,pins)
+
+
if __name__ == "__main__":
unittest.main()
diff --git a/mobile/native/android/README.md b/mobile/native/android/README.md
index c651e5026..458279e84 100644
--- a/mobile/native/android/README.md
+++ b/mobile/native/android/README.md
@@ -2,8 +2,10 @@
`build.sh` fetches sherpa-onnx's AAR and builds OmniVoice and llama.cpp for
`arm64-v8a` and `x86_64`, using the identities in `../pins.json` exclusively.
-Gradle's app `preBuild` invokes it and packages both JNI libraries, their C++
-runtime and the pinned sherpa AAR. No model is fetched by a build.
+Gradle's app `preBuild` packages both JNI libraries, their C++ runtime and the
+pinned sherpa AAR. `buildNativeRuntimes` depends on `:core:local:fetchRuntimes`,
+then invokes `build.sh --skip-fetch`: Gradle fetches once even with `--parallel`.
+The fetch task tracks extracted sources as outputs, so removing them reruns preparation. No model is fetched by a build.
Requirements: Python 3, JDK 21, Android SDK 36, CMake 3.22.1 and NDK
**27.1.12297006** (also pinned in Gradle). Set `ANDROID_HOME` to the SDK root.
@@ -21,7 +23,7 @@ in that file and a reviewed SHA-256 in `source-checksums.json`; a changed pin
without a matching checksum fails closed. The additional GGML pin is the
OmniVoice commit's `ggml` gitlink, `f3bc6505c4e2ede83a193e0fb4695938ff3804fd`.
No git command changes the app checkout or populates a nested git repository.
-Every invocation rechecks archive hashes. Extracted sources and per-ABI CMake
+Standalone builds and Gradle fetch-task executions recheck archive hashes. Extracted sources and per-ABI CMake
outputs are reused; deleting `build/` produces a complete source rebuild.
The archive-only OmniVoice version generator embeds its pinned commit instead
of accidentally discovering the parent app repository. llama receives its
@@ -31,8 +33,16 @@ The two runtimes each statically link their own GGML into a separate JNI shared
library. Hidden archive symbols and internal symbol binding prevent their
incompatible GGML ABIs from interposing. Libraries use 16 KB ELF alignment and
CPU execution on both ABIs; no acceleration or network service is required.
-Runtime MIT notices are copied into generated app assets; the app also includes
-Apache-2.0 and dependency notices. Model terms travel in the shared catalogue
+The app's checked-in `app/src/main/assets/licenses/native-*` assets contain the
+same 17 native component notices as iOS: sherpa-onnx, ONNX Runtime, eSpeak NG,
+piper-phonemize, kaldi-native-fbank, KissFFT, kaldi-decoder, kaldifst, OpenFst,
+simple-sentencepiece, nlohmann/json, hclust-cpp, Eigen, OmniVoice, llama.cpp and each
+runtime's GGML. This includes full GPL-3.0 and BSD terms. `native-sources.json`
+records source URLs, provenance and notice SHA-256 values. The corresponding-source
+notice links eSpeak's pinned complete source archive and the build configuration.
+`python3 mobile/native/android/verify-notices.py` verifies texts and runtime pins;
+`build.sh` runs that check before completing. Updating runtime pins requires
+updating these legal assets from the pinned upstream sources too. Model terms travel in the shared catalogue
and require a separate local acceptance where applicable.
JNI implements reference-audio cloning using `ov_init`/`ov_synthesize` and
@@ -44,8 +54,10 @@ native inference, and native allocations are released before calls return.
OmniVoice model initialization has no abort hook; cancellation during its load
is observed as soon as initialization returns. sherpa Whisper similarly has no
abort hook in this AAR: offline ASR decodes at most 20 seconds of audio between
-cancellation checks. Online ASR checks between each decoder step. Model hashing
-and streaming downloads check cancellation as they read.
+cancellation checks. Online ASR checks between each decoder step. Model hashing and streaming downloads check cancellation as they read. The model
+store caches successful file verification by size, modification time and catalogue
+identity for the process lifetime, invalidating it when files change or native use
+fails. Cancellation retains the native lease until the actual call and cleanup return.
Both ABIs compile on this host. Actual Android library loading, audio quality,
microphone behavior and OmniVoice/llama model compatibility require maintainer
diff --git a/mobile/native/android/build.sh b/mobile/native/android/build.sh
index 28a04583f..9f8a4a05c 100755
--- a/mobile/native/android/build.sh
+++ b/mobile/native/android/build.sh
@@ -2,7 +2,7 @@
set -euo pipefail
root="$(cd "$(dirname "$0")" && pwd)"
export GIT_CEILING_DIRECTORIES="$root/build/sources"
-python3 "$root/fetch.py"
+if [[ "${1:-}" != "--skip-fetch" ]]; then python3 "$root/fetch.py"; fi
if [[ "${1:-}" == "--fetch-only" ]]; then exit 0; fi
sdk="${ANDROID_HOME:-/opt/homebrew/share/android-commandlinetools}"
ndk="$sdk/ndk/27.1.12297006"
@@ -26,9 +26,9 @@ for abi in arm64-v8a x86_64; do
cp "$toolchain/sysroot/usr/lib/$([[ "$abi" == arm64-v8a ]] && echo aarch64-linux-android || echo x86_64-linux-android)/libc++_shared.so" "$root/build/jniLibs/$abi/"
done
-mkdir -p "$root/build/assets/licenses"
-cp "$root/build/sources/omnivoice.cpp-$omni_commit/LICENSE" "$root/build/assets/licenses/omnivoice-MIT.txt"
-cp "$root/build/sources/omnivoice.cpp-$omni_commit/ggml/LICENSE" "$root/build/assets/licenses/omnivoice-ggml-MIT.txt"
-cp "$root/build/sources/llama.cpp-$llama_commit/LICENSE" "$root/build/assets/licenses/llama-MIT.txt"
+# Legal texts are checked in as app assets; retire copies from earlier builds.
+rm -f "$root/build/assets/licenses/omnivoice-MIT.txt" "$root/build/assets/licenses/omnivoice-ggml-MIT.txt" "$root/build/assets/licenses/llama-MIT.txt"
+mkdir -p "$root/build/assets"
+python3 "$root/verify-notices.py"
python3 "$root/verify.py" "$ndk"
diff --git a/mobile/native/android/verify-notices.py b/mobile/native/android/verify-notices.py
new file mode 100644
index 000000000..a9ce6b5bb
--- /dev/null
+++ b/mobile/native/android/verify-notices.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python3
+"""Fail closed if checked-in native notices drift from their texts or runtime pins."""
+import hashlib
+import json
+from pathlib import Path
+
+ROOT = Path(__file__).resolve().parent
+ASSETS = ROOT.parents[1] / 'android/app/src/main/assets/licenses'
+pins = json.loads((ROOT.parent / 'pins.json').read_text())
+manifest = json.loads((ASSETS / 'native-sources.json').read_text())
+entries = {entry['name']: entry for entry in manifest}
+required = {'sherpa-onnx', 'onnxruntime', 'espeak-ng-for-piper', 'piper-phonemize',
+ 'kaldi-native-fbank', 'kissfft', 'kaldi-decoder', 'kaldifst', 'openfst',
+ 'simple-sentencepiece', 'json', 'hclust-cpp', 'omnivoice.cpp',
+ 'omnivoice-ggml', 'llama.cpp', 'llama-ggml', 'eigen'}
+assert set(entries) == required, 'Incomplete native dependency notices'
+for name, entry in entries.items():
+ path = ASSETS / ('native-' + name + '.txt')
+ assert hashlib.sha256(path.read_bytes()).hexdigest() == entry['notice_sha256'], name
+for name in ('sherpa-onnx', 'omnivoice.cpp', 'llama.cpp'):
+ pin = pins[name]['source']
+ assert entries[name]['source'] == pin['repo'] + '/tree/' + pin['commit'], name
+ggml = json.loads((ROOT / 'source-checksums.json').read_text())['ggml']
+assert entries['omnivoice-ggml']['source'] == 'https://github.com/' + ggml['repo'] + '/tree/' + ggml['commit']
+assert entries['llama-ggml']['source'] == entries['llama.cpp']['source'] + '/ggml'
+corresponding = (ASSETS / 'native-Corresponding-source.txt').read_text()
+assert 'GPL-3.0' in corresponding and entries['espeak-ng-for-piper']['source'] in corresponding
+assert all(entry['source'] in corresponding for entry in entries.values())
+print('Verified 17 native dependency notices and pinned corresponding-source references')
diff --git a/mobile/native/ios/README.md b/mobile/native/ios/README.md
index b8c6c884d..c947ee751 100644
--- a/mobile/native/ios/README.md
+++ b/mobile/native/ios/README.md
@@ -17,6 +17,15 @@ mobile/native/ios/build.sh ios
The llama framework and OmniVoice framework are dynamic and must be embedded/signed. Sherpa and ONNXRuntime are static. OmniVoice includes its own static ggml with only `ov_*` symbols exported, keeping its ggml ABI separate from llama's. Metal is enabled for iOS and its shader source is embedded. The macOS test builds use CPU and do not require a Metal compiler. Archive-built OmniVoice is stamped with its actual pinned commit, rather than the enclosing VoiceStudio checkout's commit.
+`patches/omnivoice-metal-transfers.patch` fixes private-buffer transfers
+in the pinned ggml: arbitrary tensor slices use owned Metal staging buffers instead
+of no-copy wrappers requiring page-aligned memory. This avoids the simulator XPC
+trap during codec loading and preserves Metal inference on phones. Staging buffers
+are released after transfer completion; asynchronous reads copy back in the command
+completion handler before synchronization returns. The build applies the patch to its build
+copy, leaving the verified upstream source intact; the patch participates in the
+iOS cache identity.
+
Source archives are addressed by the full commit in `pins.json`. Every extracted source blob is verified against the GitHub Git tree for that commit (including the exact ggml submodule); the cache records each archive's SHA-256. Unused absolute symlinks in upstream Go examples become inert text with the same Git blob bytes. No git clone/checkout is used. Downloaded prebuilt artifacts must match the SHA-256 in `pins.json`. Build outputs are hashed into a receipt and checked before cache reuse; the iOS cache key includes the pins, build script hash and Xcode/SDK versions. Incomplete builds are discarded before retry.
ONNXRuntime's dependency version is taken from sherpa's pinned `build-ios.sh`; environment overrides to a different version are rejected. Its archive is downloaded and SHA-256 checked against the release asset's recorded digest before upstream runs, avoiding upstream's unchecked wget download. Sherpa's other CMake dependencies use its pinned source's URL hashes. **The shared `pins.json` does not contain source-archive or transitive ONNXRuntime SHA-256 entries.** Source integrity therefore uses the pinned Git tree, and ONNXRuntime uses its upstream release digest; these are distinct from a complete, self-contained SHA-256 lockfile. The platform script does not invent or modify shared pins.
@@ -24,3 +33,13 @@ ONNXRuntime's dependency version is taken from sherpa's pinned `build-ios.sh`; e
The iOS frameworks and their combined device/simulator linkage require Xcode validation. They cannot be built or linked on a CLT-only installation. Use `mobile/ios/scripts/native-load-test.sh` and the real model tests described in `mobile/ios/README.md` for macOS verification; those do not imply an iOS SDK build passed.
The `VSNative` shim owns fixed C callback signatures, copied result memory and cancellation flags. Its Whisper segment adapter enables token timestamps on the pinned C API and returns owned speech envelopes for 20-second windows. Streaming fixes its sample rate from the first chunk and pads its tail at that rate. Voice and dub features use the `VoiceStudioKit.LocalEngine` protocol with this same shim on macOS and iOS. `mobile/ios/scripts/auxiliary-inference.sh` runs the real reference/clone and audio-dub workflows sequentially; the application uses the xcframeworks without changing feature code.
+
+Dependency legal texts live in `mobile/ios/VoiceStudio/Resources/NativeLicences/`, including the full eSpeak NG GPL text and `Corresponding-source.txt` with pinned upstream source archives/commits and the VoiceStudio build-script location. The same native component set is required on Android. The manifest contains 17 components: sherpa-onnx, ONNX Runtime, eSpeak NG, piper-phonemize, kaldi-native-fbank, KissFFT, kaldi-decoder, kaldifst, OpenFST, Eigen, simple-sentencepiece, JSON, hclust-cpp, OmniVoice, its ggml, llama.cpp and its ggml. Nested dependency pins honor sherpa's CMake-module overrides (including OpenFST and Eigen), matching its actual build.
+
+Regenerate the legal assets explicitly after preparing the native sources:
+
+```sh
+python3 mobile/native/ios/prepare-notices.py
+```
+
+The generator checks runtime sources against their pinned Git trees and dependency archives against the SHA-256 in that pinned sherpa source. It retains original copyright/licence/notice texts and generates source references and notice hashes. Package resource preparation checks the manifest before bundling it; native builds copy the same texts into their notices directory. Native cache identities include the legal manifest. This command needs network access only for uncached pinned sources; the app never fetches notices at runtime.
diff --git a/mobile/native/ios/build.py b/mobile/native/ios/build.py
index d9478a5ad..aa90b6015 100644
--- a/mobile/native/ios/build.py
+++ b/mobile/native/ios/build.py
@@ -75,7 +75,13 @@ def extract_tar(archive, output):
def api(path):
- request = urllib.request.Request('https://api.github.com/repos/' + path, headers={'User-Agent': 'VoiceStudio-native-builder'})
+ headers = {'User-Agent': 'VoiceStudio-native-builder'}
+ # Anonymous API calls share a 60/hour limit per IP, which shared CI runners
+ # exhaust; CI passes its read-only token. Responses are cached under build/.
+ token = os.environ.get('GITHUB_TOKEN')
+ if token:
+ headers['Authorization'] = 'Bearer ' + token
+ request = urllib.request.Request('https://api.github.com/repos/' + path, headers=headers)
with urllib.request.urlopen(request, timeout=90) as response:
return json.load(response)
@@ -182,6 +188,11 @@ def stamp_omni_source(verified, output):
content = '#pragma once\n#define OMNIVOICE_VERSION "' + commit + ' (pinned)"\n'
cmake = 'set(CONTENT [=[' + content + ']=])\nif(EXISTS "${OUTPUT}")\n file(READ "${OUTPUT}" EXISTING)\n if("${EXISTING}" STREQUAL "${CONTENT}")\n return()\n endif()\nendif()\nfile(WRITE "${OUTPUT}" "${CONTENT}")\n'
(target / 'tools/version.cmake').write_text(cmake)
+ patch = HERE / 'patches/omnivoice-metal-transfers.patch'
+ if subprocess.run(['git', 'apply', '--reverse', '--check', str(patch)], cwd=target,
+ stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode:
+ run('git', 'apply', '--check', patch, cwd=target)
+ run('git', 'apply', patch, cwd=target)
return target
@@ -199,28 +210,32 @@ def framework(name, library, headers, output, platform_name):
return target
-def notices(output, sherpa, omni, llama):
- target = output / 'Notices'
- target.mkdir(parents=True, exist_ok=True)
- for name, root in [('sherpa-onnx', sherpa), ('omnivoice', omni), ('llama', llama), ('ggml', omni / 'ggml')]:
- shutil.copy2(root / 'LICENSE', target / (name + '-LICENSE.txt'))
- # Preserve licence/notice files from sherpa's fetched CMake dependencies as well.
- deps = sherpa / 'build-ios/build'
- if deps.exists():
- for file in deps.rglob('*'):
- if file.is_file() and file.name.upper() in ['LICENSE', 'LICENSE.TXT', 'COPYING', 'NOTICE']:
- relative = str(file.relative_to(deps)).replace('/', '-')
- shutil.copy2(file, target / ('sherpa-dependency-' + relative + '.txt'))
+def notices(output):
+ source = ROOT / 'mobile/ios/VoiceStudio/Resources/NativeLicences'
+ entries = json.loads((source / 'sources.json').read_text())
+ for entry in entries:
+ if digest(source / (entry['name'] + '.txt')) != entry['notice_sha256']:
+ raise RuntimeError('Native notice changed: ' + entry['name'])
+ if entry['name'] in PINS:
+ pin = PINS[entry['name']]['source']
+ if entry['source'] != pin['repo'] + '/tree/' + pin['commit']:
+ raise RuntimeError('Native notice pin drift: ' + entry['name'])
+ shutil.copytree(source, output / 'Notices', dirs_exist_ok=True)
+
+
+def onnxruntime_notice(sherpa):
version = re.search(r'SHERPA_ONNX_ONNXRUNTIME_VERSION:-([^}]+)', (sherpa / 'build-ios.sh').read_text()).group(1)
- cache = BUILD / 'downloads' / ('onnxruntime-' + version + '-LICENSE.txt')
+ cache = BUILD / 'downloads' / ('onnxruntime-' + version + '-LICENSE.json')
if not cache.exists():
- entry = api('microsoft/onnxruntime/contents/LICENSE?ref=v' + version)
- payload = base64.b64decode(entry['content'])
- blob = hashlib.sha1(b'blob ' + str(len(payload)).encode() + b'\0' + payload).hexdigest()
- if blob != entry['sha']:
- raise RuntimeError('ONNXRuntime licence blob mismatch')
- cache.write_bytes(payload)
- shutil.copy2(cache, target / 'onnxruntime-LICENSE.txt')
+ cache.write_text(json.dumps(api('microsoft/onnxruntime/contents/LICENSE?ref=v' + version)))
+ entry = json.loads(cache.read_text())
+ payload = base64.b64decode(entry['content'])
+ blob = hashlib.sha1(b'blob ' + str(len(payload)).encode() + b'\0' + payload).hexdigest()
+ if blob != entry['sha']:
+ raise RuntimeError('ONNXRuntime licence blob mismatch')
+ text = cache.with_suffix('.txt')
+ text.write_bytes(payload)
+ return text
def macos_runtimes():
@@ -250,7 +265,7 @@ def ios():
# Fail before downloading if the SDK is absent.
run('xcrun', '--sdk', 'iphoneos', '--show-sdk-path')
toolchain = subprocess.check_output(['xcodebuild', '-version'], text=True) + subprocess.check_output(['xcrun', '--sdk', 'iphoneos', '--show-sdk-version'], text=True)
- pin_key = hashlib.sha256((HERE.parent / 'pins.json').read_bytes() + (HERE / 'build.py').read_bytes() + toolchain.encode()).hexdigest()
+ pin_key = hashlib.sha256((HERE.parent / 'pins.json').read_bytes() + (HERE / 'build.py').read_bytes() + (HERE / 'patches/omnivoice-metal-transfers.patch').read_bytes() + (ROOT / 'mobile/ios/VoiceStudio/Resources/NativeLicences/sources.json').read_bytes() + toolchain.encode()).hexdigest()
output = BUILD / 'ios' / pin_key
stable = BUILD / 'xcframeworks'
sherpa, _ = source(**{k: PINS['sherpa-onnx']['source'][k] for k in ('repo', 'commit')})
@@ -295,7 +310,7 @@ def ios():
library = next(build.rglob('libomnivoice.dylib'))
frameworks.append(framework('OmniVoice', library, [omni / 'src/omnivoice.h'], output / sdk, platform_name))
run('xcodebuild', '-create-xcframework', '-framework', frameworks[0], '-framework', frameworks[1], '-output', output / 'OmniVoice.xcframework')
- notices(output, sherpa, omni, llama)
+ notices(output)
receipt = {'toolchain': toolchain, 'pins_sha256': digest(HERE.parent / 'pins.json'), 'build_script_sha256': digest(HERE / 'build.py'), 'artifacts': {str(p.relative_to(output)): digest(p) for p in output.rglob('*') if p.is_file()}}
(output / 'complete.json').write_text(json.dumps(receipt, indent=2))
receipt = json.loads((output / 'complete.json').read_text())
diff --git a/mobile/native/ios/patches/omnivoice-metal-transfers.patch b/mobile/native/ios/patches/omnivoice-metal-transfers.patch
new file mode 100644
index 000000000..8dc1bad03
--- /dev/null
+++ b/mobile/native/ios/patches/omnivoice-metal-transfers.patch
@@ -0,0 +1,76 @@
+--- a/ggml/src/ggml-metal/ggml-metal-device.m
++++ b/ggml/src/ggml-metal/ggml-metal-device.m
+@@ -1657,11 +1657,10 @@
+
+ @autoreleasepool {
+ // src
+- void * data_ptr = (void *)(uintptr_t) data; // "const cast" the src data
+- id<MTLBuffer> buf_src = [buf->dev->mtl_device newBufferWithBytesNoCopy:data_ptr
++ // Tensor slices need not have the page alignment required by no-copy buffers.
++ id<MTLBuffer> buf_src = [buf->dev->mtl_device newBufferWithBytes:data
+ length:size
+- options:MTLResourceStorageModeShared
+- deallocator:nil];
++ options:MTLResourceStorageModeShared];
+
+ GGML_ASSERT(buf_src);
+
+@@ -1698,8 +1697,9 @@
+
+ dispatch_semaphore_wait(completion_semaphore, DISPATCH_TIME_FOREVER);
+ dispatch_release(completion_semaphore);
++ [buf_src release];
+
+ //[cmd_buf waitUntilCompleted];
+ }
+ }
+
+@@ -1715,10 +1715,8 @@
+ bid_src.offs += offset;
+
+ // dst
+- id<MTLBuffer> buf_dst = [buf->dev->mtl_device newBufferWithBytesNoCopy:data
+- length:size
+- options:MTLResourceStorageModeShared
+- deallocator:nil];
++ id<MTLBuffer> buf_dst = [buf->dev->mtl_device newBufferWithLength:size
++ options:MTLResourceStorageModeShared];
+
+ GGML_ASSERT(buf_dst);
+
+@@ -1738,6 +1736,8 @@
+
+ [cmd_buf commit];
+ [cmd_buf waitUntilCompleted];
++ memcpy(data, [buf_dst contents], size);
++ [buf_dst release];
+ }
+ }
+
+--- a/ggml/src/ggml-metal/ggml-metal-context.m
++++ b/ggml/src/ggml-metal/ggml-metal-context.m
+@@ -351,10 +351,8 @@
+ void ggml_metal_get_tensor_async(ggml_metal_t ctx, const struct ggml_tensor * tensor, void * data, size_t offset, size_t size) {
+ @autoreleasepool {
+ id<MTLDevice> device = ggml_metal_device_get_obj(ctx->dev);
+- id<MTLBuffer> buf_dst = [device newBufferWithBytesNoCopy:data
+- length:size
+- options:MTLResourceStorageModeShared
+- deallocator:nil];
++ id<MTLBuffer> buf_dst = [device newBufferWithLength:size
++ options:MTLResourceStorageModeShared];
+
+ GGML_ASSERT(buf_dst);
+
+@@ -378,6 +376,11 @@
+ size:size];
+
+ [encoder endEncoding];
++ // The caller owns data until synchronization; copy before completion.
++ [cmd_buf addCompletedHandler:^(id<MTLCommandBuffer> completed) {
++ GGML_UNUSED(completed);
++ memcpy(data, [buf_dst contents], size);
++ }];
+ [cmd_buf commit];
+ [buf_dst release];
+
diff --git a/mobile/native/ios/prepare-notices.py b/mobile/native/ios/prepare-notices.py
new file mode 100644
index 000000000..0ec6483a1
--- /dev/null
+++ b/mobile/native/ios/prepare-notices.py
@@ -0,0 +1,106 @@
+#!/usr/bin/env python3
+"""Materialize upstream legal texts from the locked runtime/dependency sources."""
+import json
+from pathlib import Path
+import re
+import tarfile
+import zipfile
+
+import build
+
+OUTPUT = build.ROOT / 'mobile/ios/VoiceStudio/Resources/NativeLicences'
+# These libraries are merged into sherpa's default iOS archive; header-only
+# dependencies and nested dependencies retain their notices too.
+DEPENDENCIES = ['espeak-ng-for-piper', 'piper-phonemize', 'kaldi-native-fbank',
+ 'kaldi-decoder', 'simple-sentencepiece', 'json', 'hclust-cpp', 'eigen']
+
+
+def license_name(name):
+ name = name.upper()
+ return name in ('LICENSE', 'LICENCE', 'COPYING', 'NOTICE', 'COPYRIGHT') or name.startswith(('LICENSE.', 'COPYING.', 'LICENCE.'))
+
+
+def legal_file(path):
+ return license_name(Path(path).name) or path.endswith("/LICENSES/BSD-3-Clause")
+
+
+def archive_files(archive):
+ if zipfile.is_zipfile(archive):
+ with zipfile.ZipFile(archive) as source:
+ return {n: source.read(n) for n in source.namelist() if not n.endswith('/') and (legal_file(n) or '/cmake/' in n)}
+ with tarfile.open(archive) as source:
+ return {m.name: source.extractfile(m).read() for m in source.getmembers() if m.isfile() and (legal_file(m.name) or '/cmake/' in m.name)}
+
+
+def prepare():
+ OUTPUT.mkdir(parents=True, exist_ok=True)
+ manifest = []
+ def record(name, url, files, checksum):
+ text = []
+ for path, data in sorted(files.items()):
+ if legal_file(path):
+ text.append(path + '\n\n' + data.decode('utf-8', errors='replace'))
+ if not text:
+ raise RuntimeError('Missing upstream licence: ' + name)
+ content = name + '\nSource: ' + url + '\n\n' + '\n\n'.join(text)
+ target = OUTPUT / (name + '.txt')
+ target.write_text(content)
+ manifest.append({'name': name, 'source': url, 'source_sha256': checksum,
+ 'notice_sha256': build.digest(target)})
+
+ roots = {}
+ for name in ['sherpa-onnx', 'omnivoice.cpp', 'llama.cpp']:
+ pin = build.PINS[name]['source']
+ root, modules = build.source(pin['repo'], pin['commit'])
+ roots[name] = root
+ files = {str(p.relative_to(root)): p.read_bytes() for p in root.iterdir() if p.is_file() and license_name(p.name)}
+ record(name, pin['repo'] + '/tree/' + pin['commit'], files, json.loads((root / '.voicestudio-source.json').read_text()).get('archive_sha256', 'git-tree-verified'))
+ if name == 'omnivoice.cpp':
+ commit = next(m['sha'] for m in modules if m['path'] == 'ggml')
+ ggml, _ = build.source('https://github.com/ServeurpersoCom/ggml', commit)
+ record('omnivoice-ggml', 'https://github.com/ServeurpersoCom/ggml/tree/' + commit, {'LICENSE': (ggml / 'LICENSE').read_bytes()}, 'git-tree-verified')
+ elif name == 'llama.cpp':
+ # llama's ggml shares its MIT notice; retain a separately named entry.
+ record('llama-ggml', pin['repo'] + '/tree/' + pin['commit'] + '/ggml', {'LICENSE': (root / 'LICENSE').read_bytes()}, 'git-tree-verified')
+
+ seen = set()
+ def dependency(name, cmake):
+ if name in seen:
+ return
+ seen.add(name)
+ # Upstream places sherpa's cmake directory first, overriding nested pins.
+ override = roots['sherpa-onnx'] / 'cmake' / (name + '.cmake')
+ if override.exists():
+ cmake = override.read_text()
+ url = re.search(r'set\([^\s]+_URL\s+"(https://[^"\n]+)"', cmake)
+ checksum = re.search(r'_HASH\s+"SHA256=([0-9a-f]{64})"', cmake)
+ if not url or not checksum:
+ raise RuntimeError('Missing dependency pin: ' + name)
+ url, checksum = url.group(1), checksum.group(1)
+ suffix = '.zip' if url.endswith('.zip') else '.tar.gz'
+ archive = build.download(url, build.BUILD / 'downloads' / ('notice-' + checksum + suffix), checksum)
+ files = archive_files(archive)
+ record(name, url, files, checksum)
+ for path, data in files.items():
+ if Path(path).name in ('kissfft.cmake', 'kaldifst.cmake', 'openfst.cmake', 'ucd.cmake', 'eigen.cmake'):
+ dependency(Path(path).stem, data.decode())
+ for name in DEPENDENCIES:
+ dependency(name, (roots['sherpa-onnx'] / 'cmake' / (name + '.cmake')).read_text())
+ version = re.search(r'SHERPA_ONNX_ONNXRUNTIME_VERSION:-([^}]+)', (roots['sherpa-onnx'] / 'build-ios.sh').read_text()).group(1)
+ cache = build.onnxruntime_notice(roots['sherpa-onnx'])
+ record('onnxruntime', 'https://github.com/microsoft/onnxruntime/tree/v' + version, {'LICENSE': cache.read_bytes()}, build.digest(cache))
+ (OUTPUT / 'sources.json').write_text(json.dumps(manifest, indent=2) + '\n')
+ (OUTPUT / 'Corresponding-source.txt').write_text(
+ 'VoiceStudio native runtime corresponding sources\n\n'
+ 'eSpeak NG is GPL-3.0. Its complete pinned upstream source archive,\n'
+ 'including its build scripts, is listed below. The pinned sherpa-onnx\n'
+ 'source and VoiceStudio mobile/native/ios/build.py and build.sh contain\n'
+ 'the build configuration used to combine these dependencies.\n'
+ 'VoiceStudio source: https://github.com/debpalash/VoiceStudio\n'
+ 'Runtime pins: mobile/native/pins.json\n\n' +
+ '\n'.join(m['name'] + ': ' + m['source'] for m in manifest) + '\n')
+ print('Prepared', len(manifest), 'native dependency notices in', OUTPUT)
+
+
+if __name__ == '__main__':
+ prepare()