diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + 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/MODEL_NOTICES.md b/MODEL_NOTICES.md new file mode 100644 index 0000000..82ee26f --- /dev/null +++ b/MODEL_NOTICES.md @@ -0,0 +1,29 @@ +# Speech model notice + +Voice Inbox can download and use the following speech-recognition model. The +model files are third-party material and are not licensed under the Voice Inbox +Apache License 2.0. + +## Model lineage + +- Base model: [NVIDIA Parakeet TDT 0.6B v3](https://huggingface.co/nvidia/parakeet-tdt-0.6b-v3) +- ONNX/INT8 conversion: [`istupakov/parakeet-tdt-0.6b-v3-onnx`](https://huggingface.co/istupakov/parakeet-tdt-0.6b-v3-onnx) +- Revision used by Voice Inbox: [`8f23f0c03c8761650bdb5b40aaf3e40d2c15f1ce`](https://huggingface.co/istupakov/parakeet-tdt-0.6b-v3-onnx/tree/8f23f0c03c8761650bdb5b40aaf3e40d2c15f1ce) +- License: [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/) +- Full license text: [CC BY 4.0 legal code](https://creativecommons.org/licenses/by/4.0/legalcode.en) + +The upstream derivative converts the NVIDIA model to ONNX and provides INT8 +quantized model files. Voice Inbox downloads the files from the pinned revision +without claiming authorship, ownership, sponsorship, or endorsement by NVIDIA +or the converter. + +## Distribution boundary + +The model weights are not stored in this source repository and are not bundled +in the Android or iOS application package. They are downloaded separately at +the user's request, or installed from a folder selected by the user. Voice +Inbox verifies downloaded files against the sizes and SHA-256 hashes declared +in `shared/src/commonMain/kotlin/me/maxistar/voiceinbox/core/SpeechModelManifest.kt`. + +If the model identifier, pinned revision, conversion, or quantization changes, +this notice must be reviewed before publishing the affected release. diff --git a/README.md b/README.md index 1d9b103..ca4bcfa 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,18 @@ Requirements: The Gradle build extracts ONNX Runtime, builds the Rust JNI library for `arm64-v8a`, and packages the required native libraries. +## License + +Unless otherwise noted, original Voice Inbox source code is licensed under the +[Apache License 2.0](LICENSE). Third-party components and speech-model weights +retain their own licenses and are not relicensed as Voice Inbox source code. + +- [Third-party software notices](THIRD_PARTY_NOTICES.md) +- [Speech model attribution and CC BY 4.0 terms](MODEL_NOTICES.md) + +The speech-model weights are downloaded separately and are not included in this +source repository or in the Android and iOS application packages. + ## iOS Application The repository includes a SwiftUI iOS application at diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md new file mode 100644 index 0000000..23f4eec --- /dev/null +++ b/THIRD_PARTY_NOTICES.md @@ -0,0 +1,162 @@ +# Third-party notices + +Voice Inbox contains or links against third-party software. Those components +remain under their own licenses and are not relicensed under the Voice Inbox +Apache License 2.0. Copyright belongs to the respective authors and contributors +identified by each upstream project. + +This inventory was reviewed against the Android `releaseRuntimeClasspath`, the +Kotlin Multiplatform source sets, the iOS link configuration, Cargo's locked +Android and iOS dependency graphs, and the static website output. Build-only +tools such as Gradle plugins, the Rust compiler, and Astro/Node packages are not +delivered in the application or static website and are intentionally excluded. + +## Application and native components + +| Component | Version used | License and attribution | Used by | +| --- | --- | --- | --- | +| AndroidX libraries | Resolved by `gradle/libs.versions.toml` and `releaseRuntimeClasspath` | Apache-2.0; Copyright The Android Open Source Project and contributors | Android | +| Material Components for Android | 1.13.0 | Apache-2.0; Copyright Google LLC and contributors | Android | +| Kotlin standard library, Kotlin/Native runtime, kotlinx coroutines and serialization | Resolved Kotlin runtime versions | Apache-2.0; Copyright JetBrains and Kotlin contributors | Android and iOS | +| SQLDelight runtime and Android/native drivers | 2.1.0 | Apache-2.0; Copyright 2016 Square, Inc. and contributors | Android and iOS | +| SQLite | Platform/native driver version | Public domain; see the [SQLite copyright page](https://www.sqlite.org/copyright.html) | Android and iOS | +| OkHttp | 4.12.0 | Apache-2.0; Copyright 2019 Square, Inc. and contributors | Android | +| Okio | 3.6.0 | Apache-2.0; Copyright Square, Inc. and contributors | Android | +| ONNX Runtime | 1.22.0 | MIT; Copyright Microsoft Corporation and contributors. See the [ONNX Runtime license](https://github.com/microsoft/onnxruntime/blob/v1.22.0/LICENSE) and [version-specific third-party notices](https://github.com/microsoft/onnxruntime/blob/v1.22.0/ThirdPartyNotices.txt). | Android and iOS | +| `ort` and `ort-sys` Rust crates | 2.0.0-rc.10 | MIT OR Apache-2.0; Copyright the `ort` contributors | Android and iOS native bridge | +| Android NDK `libc++_shared.so` | NDK r30 beta 1 (`30.0.14904198`) | Apache-2.0 WITH LLVM-exception; Copyright the LLVM Project contributors. See the [LLVM license](https://github.com/llvm/llvm-project/blob/main/LICENSE.TXT). | Android | +| `transcribe-rs` | 0.1.4, vendored | MIT; Copyright (c) 2025 Ilya Stupakov. The complete permission and warranty text is retained in [`transcribe-rs/LICENSE`](transcribe-rs/LICENSE). | Android and iOS native bridge | + +The complete Apache License 2.0 text is available in [`LICENSE`](LICENSE). +ONNX Runtime carries its own MIT license and upstream notices; its inclusion +does not place ONNX Runtime under the Voice Inbox project license. + +## Rust dependency inventory + +The following packages are statically linked into, or reachable from, the +locked native dependency graphs used for Android and iOS. Versions and declared +license expressions come from Cargo package metadata for `Cargo.lock`. A slash +in older metadata is treated as the package author's dual-license declaration, +not as a new project license. + +### `(MIT OR Apache-2.0) AND Unicode-3.0` + +`unicode-ident 1.0.22` + +### `Apache-2.0` + +`hound 3.5.1`, `sync_wrapper 1.0.2` + +### `Apache-2.0 / MIT` + +`fnv 1.0.7` + +### `Apache-2.0 AND ISC` + +`ring 0.17.14` + +### `Apache-2.0 OR BSL-1.0` + +`ryu 1.0.20` + +### `Apache-2.0 OR ISC OR MIT` + +`hyper-rustls 0.27.7`, `rustls 0.23.35`, `rustls-native-certs 0.8.2` + +### `Apache-2.0 OR MIT` + +`atomic-waker 1.1.2`, `idna_adapter 1.2.1`, `pin-project-lite 0.2.16`, +`secrecy 0.10.3`, `utf8_iter 1.0.4`, `zeroize 1.8.2` + +### `Apache-2.0/MIT` + +`cesu8 1.1.0` + +### `BSD-2-Clause OR Apache-2.0 OR MIT` + +`zerocopy 0.8.28` + +### `BSD-3-Clause` + +`instant 0.1.13`, `subtle 2.6.1` + +### `ISC` + +`libloading 0.8.9`, `rustls-webpki 0.103.8`, `untrusted 0.9.0` + +### `MIT` + +`async-openai 0.29.3`, `async-openai-macros 0.1.0`, `bytes 1.11.0`, +`combine 4.6.7`, `darling 0.20.11`, `darling_core 0.20.11`, +`darling_macro 0.20.11`, `http-body 1.0.1`, `http-body-util 0.1.3`, +`hyper 1.8.1`, `hyper-util 0.1.18`, `is-terminal 0.4.17`, +`mime_guess 2.0.5`, `mio 1.1.0`, `nom 7.1.3`, `slab 0.4.11`, +`strsim 0.11.1`, `synstructure 0.13.2`, `tokio 1.47.1`, +`tokio-macros 2.5.0`, `tokio-stream 0.1.17`, `tokio-util 0.7.17`, +`tower 0.5.2`, `tower-http 0.6.6`, `tower-layer 0.3.3`, +`tower-service 0.3.3`, `tracing 0.1.41`, `tracing-attributes 0.1.30`, +`tracing-core 0.1.34`, `try-lock 0.2.5`, `want 0.3.1` + +### `MIT OR Apache-2.0` + +`android_log-sys 0.3.2`, `android_logger 0.13.3`, `async-trait 0.1.89`, +`base64 0.22.1`, `bitflags 2.10.0`, `cfg-if 1.0.4`, +`derive_builder 0.20.2`, `derive_builder_core 0.20.2`, +`derive_builder_macro 0.20.2`, `displaydoc 0.2.5`, `env_logger 0.10.0`, +`eventsource-stream 0.2.3`, `form_urlencoded 1.2.2`, `futures 0.3.31`, +`futures-channel 0.3.31`, `futures-core 0.3.31`, +`futures-executor 0.3.31`, `futures-io 0.3.31`, `futures-macro 0.3.31`, +`futures-sink 0.3.31`, `futures-task 0.3.31`, `futures-util 0.3.31`, +`getrandom 0.2.16`, `getrandom 0.3.4`, `http 1.3.1`, `httparse 1.10.1`, +`humantime 2.3.0`, `idna 1.1.0`, `ipnet 2.11.0`, `iri-string 0.7.9`, +`itoa 1.0.15`, `libc 0.2.177`, `log 0.4.28`, `mime 0.3.17`, +`ndarray 0.16.1`, `num-complex 0.4.6`, `num-integer 0.1.46`, +`num-traits 0.2.19`, `once_cell 1.21.3`, `ort 2.0.0-rc.10`, +`ort-sys 2.0.0-rc.10`, `percent-encoding 2.3.2`, `pin-utils 0.1.0`, +`ppv-lite86 0.2.21`, `proc-macro2 1.0.103`, `quote 1.0.42`, +`rand 0.8.5`, `rand 0.9.2`, `rand_chacha 0.3.1`, `rand_chacha 0.9.0`, +`rand_core 0.6.4`, `rand_core 0.9.3`, `regex 1.11.2`, +`regex-automata 0.4.13`, `regex-syntax 0.8.8`, `reqwest 0.12.24`, +`reqwest-eventsource 0.6.0`, `rustls-pki-types 1.13.0`, `serde 1.0.228`, +`serde_core 1.0.228`, `serde_derive 1.0.228`, `serde_json 1.0.145`, +`smallvec 1.15.1`, `smallvec 2.0.0-alpha.10`, `socket2 0.6.1`, +`stable_deref_trait 1.2.1`, `syn 2.0.110`, `thiserror 1.0.69`, +`thiserror 2.0.16`, `thiserror-impl 1.0.69`, `thiserror-impl 2.0.16`, +`tokio-rustls 0.26.4`, `unicase 2.8.1`, `url 2.5.7` + +### `MIT/Apache-2.0` + +`backoff 0.4.0`, `futures-timer 3.0.3`, `ident_case 1.0.1`, +`jni 0.21.1`, `jni-sys 0.3.0`, `matrixmultiply 0.3.10`, +`minimal-lexical 0.2.1`, `openssl-probe 0.1.6`, `rawpointer 0.2.1`, +`serde_urlencoded 0.7.1` + +### `Unicode-3.0` + +`icu_collections 2.1.1`, `icu_locale_core 2.1.1`, +`icu_normalizer 2.1.1`, `icu_normalizer_data 2.1.1`, +`icu_properties 2.1.1`, `icu_properties_data 2.1.1`, +`icu_provider 2.1.1`, `litemap 0.8.1`, `potential_utf 0.1.4`, +`tinystr 0.8.2`, `writeable 0.6.2`, `yoke 0.8.1`, `yoke-derive 0.8.1`, +`zerofrom 0.1.6`, `zerofrom-derive 0.1.6`, `zerotrie 0.2.3`, +`zerovec 0.11.5`, `zerovec-derive 0.11.2` + +### `Unlicense OR MIT` + +`aho-corasick 1.1.4`, `memchr 2.7.6`, `termcolor 1.4.1` + +Canonical license texts can be found through the SPDX license list: + +- [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +- [MIT](https://spdx.org/licenses/MIT.html) +- [BSD-2-Clause](https://spdx.org/licenses/BSD-2-Clause.html) +- [BSD-3-Clause](https://spdx.org/licenses/BSD-3-Clause.html) +- [ISC](https://spdx.org/licenses/ISC.html) +- [BSL-1.0](https://spdx.org/licenses/BSL-1.0.html) +- [Unicode-3.0](https://spdx.org/licenses/Unicode-3.0.html) +- [Unlicense](https://spdx.org/licenses/Unlicense.html) + +There were no missing license declarations or copyleft/source-offer licenses in +the reviewed locked Android and iOS Rust graphs. This inventory must be +regenerated and reviewed when `Cargo.lock`, Gradle runtime dependencies, native +frameworks, or application packaging changes. diff --git a/app/build.gradle.kts b/app/build.gradle.kts index dfe4eec..4e3f1f0 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -24,8 +24,8 @@ android { applicationId = "me.maxistar.voiceinbox" minSdk = 24 targetSdk = 36 - versionCode = 2 - versionName = "0.2.0" + versionCode = 3 + versionName = "0.2.1" ndk { abiFilters += "arm64-v8a" } diff --git a/app/src/androidTest/java/me/maxistar/voiceinbox/MainActivityInstrumentedTest.kt b/app/src/androidTest/java/me/maxistar/voiceinbox/MainActivityInstrumentedTest.kt index 99407dd..52e992d 100644 --- a/app/src/androidTest/java/me/maxistar/voiceinbox/MainActivityInstrumentedTest.kt +++ b/app/src/androidTest/java/me/maxistar/voiceinbox/MainActivityInstrumentedTest.kt @@ -80,7 +80,38 @@ class MainActivityInstrumentedTest { val setup = displayItems(activity).filterIsInstance() setup.any { row -> row.task.actions.any { it.kind == TaskActionKind.DOWNLOAD_MODEL && it.enabled } } && setup.any { row -> row.task.actions.any { it.kind == TaskActionKind.IMPORT_MODEL && it.enabled } } && - setup.any { row -> row.task.actions.any { it.kind == TaskActionKind.SELECT_OUTPUT && it.enabled } } + setup.any { row -> + row.task.actions.map { it.kind } == + listOf(TaskActionKind.CREATE_OUTPUT, TaskActionKind.SELECT_OUTPUT) && + row.task.actions.all { it.enabled } + } + } + } + } + + @Test + fun acceptedCreatedOutputUsesExistingPersistenceAndReadinessPath() { + clearActivityState() + val output = DocumentsContract.buildDocumentUri(TestAudioDocumentsProvider.AUTHORITY, "output") + val context = InstrumentationRegistry.getInstrumentation().targetContext + val preferences = context.getSharedPreferences( + DocumentSelectionStore.PREFERENCES_NAME, + Context.MODE_PRIVATE, + ) + + ActivityScenario.launch(MainActivity::class.java).use { scenario -> + scenario.onActivity { activity -> + MainActivity::class.java + .getDeclaredMethod("acceptOutput", Uri::class.java) + .apply { isAccessible = true } + .invoke(activity, output) + } + + awaitActivity(scenario) { activity -> + preferences.getString("output_uri", null) == output.toString() && + MainActivity::class.java.getDeclaredField("outputAccessReady") + .apply { isAccessible = true } + .getBoolean(activity) } } } @@ -434,7 +465,7 @@ class MainActivityInstrumentedTest { } awaitActivity(scenario) { activity -> displayItems(activity).filterIsInstance() - .singleOrNull()?.presentation?.action?.kind == TaskActionKind.SELECT_OUTPUT + .singleOrNull()?.presentation?.action?.kind == TaskActionKind.CREATE_OUTPUT } scenario.onActivity { activity -> stateHost(activity).replace( diff --git a/app/src/androidTest/java/me/maxistar/voiceinbox/SettingsActivityInstrumentedTest.kt b/app/src/androidTest/java/me/maxistar/voiceinbox/SettingsActivityInstrumentedTest.kt index fdd0a41..e9bd39b 100644 --- a/app/src/androidTest/java/me/maxistar/voiceinbox/SettingsActivityInstrumentedTest.kt +++ b/app/src/androidTest/java/me/maxistar/voiceinbox/SettingsActivityInstrumentedTest.kt @@ -20,6 +20,19 @@ import org.junit.runner.RunWith @RunWith(AndroidJUnit4::class) class SettingsActivityInstrumentedTest { + @Test + fun outputConfigurationOffersCreationBeforeExistingSelection() { + val context = InstrumentationRegistry.getInstrumentation().targetContext + clearSettings(context) + + ActivityScenario.launch(SettingsActivity::class.java).use { + onView(withId(R.id.settingsOutputRow)).perform(scrollTo(), click()) + onView(withText(R.string.settings_output_action_title)).check(matches(isDisplayed())) + onView(withText(R.string.settings_output_create_new)).check(matches(isDisplayed())) + onView(withText(R.string.settings_output_choose_existing)).check(matches(isDisplayed())) + } + } + @Test fun startupPolicyIsDisplayedAndPersistsWithoutChangingNightlySettings() { val context = InstrumentationRegistry.getInstrumentation().targetContext diff --git a/app/src/main/java/me/maxistar/voiceinbox/AndroidInlineOnboarding.kt b/app/src/main/java/me/maxistar/voiceinbox/AndroidInlineOnboarding.kt index d3bdcb6..d3a9715 100644 --- a/app/src/main/java/me/maxistar/voiceinbox/AndroidInlineOnboarding.kt +++ b/app/src/main/java/me/maxistar/voiceinbox/AndroidInlineOnboarding.kt @@ -124,7 +124,7 @@ object AndroidOnboardingHintPresenter { ), AndroidOnboardingChecklistStep( kind = AndroidOnboardingStepKind.OUTPUT, - label = "Select transcript output", + label = "Create or choose transcript output", complete = output.state == OutputSetupSnapshotState.READY, ), AndroidOnboardingChecklistStep( @@ -195,9 +195,9 @@ object AndroidOnboardingHintPresenter { kind = TaskActionKind.IMPORT_MODEL, ) output.state != OutputSetupSnapshotState.READY -> AndroidOnboardingHintAction( - label = "Select output file", + label = "Create Output File", enabled = true, - kind = TaskActionKind.SELECT_OUTPUT, + kind = TaskActionKind.CREATE_OUTPUT, ) else -> AndroidOnboardingHintAction( label = "Select audio folder (optional)", diff --git a/app/src/main/java/me/maxistar/voiceinbox/FileSelectionRules.kt b/app/src/main/java/me/maxistar/voiceinbox/FileSelectionRules.kt index ecbff89..221c269 100644 --- a/app/src/main/java/me/maxistar/voiceinbox/FileSelectionRules.kt +++ b/app/src/main/java/me/maxistar/voiceinbox/FileSelectionRules.kt @@ -1,6 +1,9 @@ package me.maxistar.voiceinbox object FileSelectionRules { + const val DEFAULT_OUTPUT_FILE_NAME = "Voice Inbox.md" + const val CREATED_OUTPUT_MIME_TYPE = "text/markdown" + val outputMimeTypes = arrayOf( "text/plain", "text/markdown", diff --git a/app/src/main/java/me/maxistar/voiceinbox/MainActivity.kt b/app/src/main/java/me/maxistar/voiceinbox/MainActivity.kt index 6ae5a19..f9e3ffc 100644 --- a/app/src/main/java/me/maxistar/voiceinbox/MainActivity.kt +++ b/app/src/main/java/me/maxistar/voiceinbox/MainActivity.kt @@ -126,6 +126,12 @@ class MainActivity : AppCompatActivity(), StartupProcessingDialogFragment.Listen if (uri != null) acceptOutput(uri) } + private val outputCreator = registerForActivityResult( + ActivityResultContracts.CreateDocument(FileSelectionRules.CREATED_OUTPUT_MIME_TYPE), + ) { uri -> + if (uri != null) acceptOutput(uri) + } + private val folderPicker = registerForActivityResult( ActivityResultContracts.OpenDocumentTree(), ) { uri -> @@ -1073,6 +1079,12 @@ class MainActivity : AppCompatActivity(), StartupProcessingDialogFragment.Listen } } + private fun launchOutputCreatorIfEnabled() { + if (selectionControls().outputEnabled) { + outputCreator.launch(FileSelectionRules.DEFAULT_OUTPUT_FILE_NAME) + } + } + private fun launchFolderPickerIfEnabled() { if (selectionControls().folderEnabled) { folderPicker.launch(folderUri) @@ -1343,6 +1355,7 @@ class MainActivity : AppCompatActivity(), StartupProcessingDialogFragment.Listen -> SpeechModelDownloadWorker.enqueue(this) TaskActionKind.IMPORT_MODEL -> modelFolderPicker.launch(null) TaskActionKind.CANCEL_MODEL_DOWNLOAD -> SpeechModelDownloadWorker.cancel(this) + TaskActionKind.CREATE_OUTPUT -> launchOutputCreatorIfEnabled() TaskActionKind.SELECT_OUTPUT -> launchOutputPickerIfEnabled() TaskActionKind.SELECT_FOLDER -> launchFolderPickerIfEnabled() TaskActionKind.REFRESH_FOLDER -> dispatchManualFolderRefresh() diff --git a/app/src/main/java/me/maxistar/voiceinbox/SettingsActivity.kt b/app/src/main/java/me/maxistar/voiceinbox/SettingsActivity.kt index eb02b7a..f88b0e7 100644 --- a/app/src/main/java/me/maxistar/voiceinbox/SettingsActivity.kt +++ b/app/src/main/java/me/maxistar/voiceinbox/SettingsActivity.kt @@ -18,8 +18,14 @@ import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.widget.SwitchCompat import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat +import com.google.android.material.dialog.MaterialAlertDialogBuilder import java.util.concurrent.Executors +internal object VoiceInboxPublicLinks { + const val WEBSITE = "https://voiceinbox.simpleditor.org/" + const val LEGAL = "https://voiceinbox.simpleditor.org/legal/" +} + class SettingsActivity : AppCompatActivity() { private lateinit var settingsStore: ScheduledTranscriptionSettingsStore private lateinit var startupPolicyStore: StartupProcessingPolicyStore @@ -41,6 +47,12 @@ class SettingsActivity : AppCompatActivity() { if (uri != null) acceptOutput(uri) else renderStorage() } + private val outputCreator = registerForActivityResult( + ActivityResultContracts.CreateDocument(FileSelectionRules.CREATED_OUTPUT_MIME_TYPE), + ) { uri -> + if (uri != null) acceptOutput(uri) else renderStorage() + } + private val folderPicker = registerForActivityResult( ActivityResultContracts.OpenDocumentTree(), ) { uri -> @@ -87,13 +99,13 @@ class SettingsActivity : AppCompatActivity() { folderPicker.launch(selectionStore.loadFolderUri()?.let(Uri::parse)) } findViewById(R.id.settingsOutputRow).setOnClickListener { - outputPicker.launch(FileSelectionRules.outputMimeTypes) + showOutputDocumentOptions() } findViewById(R.id.settingsWebsiteRow).setOnClickListener { - openExternalUrl(WEBSITE_URL) + openExternalUrl(VoiceInboxPublicLinks.WEBSITE) } findViewById(R.id.settingsLegalRow).setOnClickListener { - openExternalUrl(LEGAL_URL) + openExternalUrl(VoiceInboxPublicLinks.LEGAL) } val startupPolicyGroup = findViewById(R.id.startupProcessingPolicy) startupPolicyGroup.check( @@ -175,6 +187,22 @@ class SettingsActivity : AppCompatActivity() { } } + private fun showOutputDocumentOptions() { + val actions = arrayOf( + getString(R.string.settings_output_create_new), + getString(R.string.settings_output_choose_existing), + ) + MaterialAlertDialogBuilder(this) + .setTitle(R.string.settings_output_action_title) + .setItems(actions) { _, index -> + when (index) { + 0 -> outputCreator.launch(FileSelectionRules.DEFAULT_OUTPUT_FILE_NAME) + 1 -> outputPicker.launch(FileSelectionRules.outputMimeTypes) + } + } + .show() + } + private fun acceptFolder(uri: Uri) { runCatching { contentResolver.takePersistableUriPermission(uri, Intent.FLAG_GRANT_READ_URI_PERMISSION) @@ -275,8 +303,4 @@ class SettingsActivity : AppCompatActivity() { packageManager.getPackageInfo(packageName, 0).versionName ?: "Unknown" }.getOrDefault("Unknown") - private companion object { - const val WEBSITE_URL = "https://projects.maxistar.me/Voice-Inbox/" - const val LEGAL_URL = "https://projects.maxistar.me/Voice-Inbox/legal/" - } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cd48ddd..c2dc0f0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -11,7 +11,10 @@ Settings Storage Audio folder - Output file + Output document + Configure output document + Create New + Choose Existing About Version: %1$s Website diff --git a/app/src/test/java/me/maxistar/voiceinbox/AndroidInlineOnboardingTest.kt b/app/src/test/java/me/maxistar/voiceinbox/AndroidInlineOnboardingTest.kt index 7deea6e..45ebd9f 100644 --- a/app/src/test/java/me/maxistar/voiceinbox/AndroidInlineOnboardingTest.kt +++ b/app/src/test/java/me/maxistar/voiceinbox/AndroidInlineOnboardingTest.kt @@ -62,7 +62,9 @@ class AndroidInlineOnboardingTest { @Test fun directSetupCompletionAdvancesThroughOutputAndOptionalFolder() { val output = present(model = readyModel()) - assertEquals(TaskActionKind.SELECT_OUTPUT, output.action?.kind) + assertEquals(TaskActionKind.CREATE_OUTPUT, output.action?.kind) + assertEquals("Create Output File", output.action?.label) + assertTrue(output.steps.single { it.kind == AndroidOnboardingStepKind.OUTPUT }.label.contains("Create or choose")) assertTrue(output.steps.first().complete) val folder = present(model = readyModel(), output = readyOutput()) diff --git a/app/src/test/java/me/maxistar/voiceinbox/AndroidMainScreenStateHostTest.kt b/app/src/test/java/me/maxistar/voiceinbox/AndroidMainScreenStateHostTest.kt index 31dede5..32146cb 100644 --- a/app/src/test/java/me/maxistar/voiceinbox/AndroidMainScreenStateHostTest.kt +++ b/app/src/test/java/me/maxistar/voiceinbox/AndroidMainScreenStateHostTest.kt @@ -213,7 +213,11 @@ class AndroidMainScreenStateHostTest { onboardingLifecycle = AndroidOnboardingHintLifecycle.ACTIVE, ), ) - assertEquals(TaskActionKind.SELECT_OUTPUT, directModelCompletion.onboardingHint.action?.kind) + assertEquals(TaskActionKind.CREATE_OUTPUT, directModelCompletion.onboardingHint.action?.kind) + assertEquals( + listOf(TaskActionKind.CREATE_OUTPUT, TaskActionKind.SELECT_OUTPUT), + directModelCompletion.taskList.tasks.single().actions.map { it.kind }, + ) assertEquals(listOf("setup:output"), directModelCompletion.taskList.tasks.map { it.stableId }) val allFilter = AndroidTaskListSnapshotMapper.state( diff --git a/app/src/test/java/me/maxistar/voiceinbox/AndroidTaskActionRouterTest.kt b/app/src/test/java/me/maxistar/voiceinbox/AndroidTaskActionRouterTest.kt index 300a260..433ffc6 100644 --- a/app/src/test/java/me/maxistar/voiceinbox/AndroidTaskActionRouterTest.kt +++ b/app/src/test/java/me/maxistar/voiceinbox/AndroidTaskActionRouterTest.kt @@ -38,6 +38,25 @@ class AndroidTaskActionRouterTest { assertTrue(router.route(request(TaskListDisplayItem.Empty.STABLE_KEY, null, TaskActionKind.IMPORT_AUDIO))) } + @Test + fun routesBothCurrentOutputConfigurationActionsAndRejectsAnotherKind() { + val state = AndroidTaskListSnapshotMapper.state( + AndroidMainScreenInput( + model = ModelSetupSnapshot(ModelSetupSnapshotState.READY), + output = OutputSetupSnapshot(OutputSetupSnapshotState.REQUIRED), + folder = FolderSetupSnapshot(FolderSetupSnapshotState.UNSELECTED), + hydration = AndroidMainScreenHydration(true, true, true, true), + ), + ) + val calls = mutableListOf() + val router = AndroidTaskActionRouter({ state }) { kind, _ -> calls += kind } + + assertTrue(router.route(request("setup:output", null, TaskActionKind.CREATE_OUTPUT))) + assertTrue(router.route(request("setup:output", null, TaskActionKind.SELECT_OUTPUT))) + assertFalse(router.route(request("setup:output", null, TaskActionKind.SELECT_FOLDER))) + assertEquals(listOf(TaskActionKind.CREATE_OUTPUT, TaskActionKind.SELECT_OUTPUT), calls) + } + @Test fun rejectsStaleDisabledConflictingAndMismatchedClicks() { var state = state(entries = listOf(entry(9))) @@ -94,6 +113,20 @@ class AndroidTaskActionRouterTest { ), ) + state = onboardingState( + model = ModelSetupSnapshot(ModelSetupSnapshotState.READY), + ) + assertTrue( + router.route( + request(TaskListDisplayItem.OnboardingHint.STABLE_KEY, null, TaskActionKind.CREATE_OUTPUT), + ), + ) + assertFalse( + router.route( + request(TaskListDisplayItem.OnboardingHint.STABLE_KEY, null, TaskActionKind.SELECT_OUTPUT), + ), + ) + state = onboardingState( model = ModelSetupSnapshot(ModelSetupSnapshotState.READY), output = OutputSetupSnapshot(OutputSetupSnapshotState.READY), @@ -114,7 +147,10 @@ class AndroidTaskActionRouterTest { request(TaskListDisplayItem.OnboardingHint.STABLE_KEY, null, TaskActionKind.DOWNLOAD_MODEL), ), ) - assertEquals(listOf(TaskActionKind.DOWNLOAD_MODEL, TaskActionKind.SELECT_FOLDER), calls) + assertEquals( + listOf(TaskActionKind.DOWNLOAD_MODEL, TaskActionKind.CREATE_OUTPUT, TaskActionKind.SELECT_FOLDER), + calls, + ) } @Test diff --git a/app/src/test/java/me/maxistar/voiceinbox/FileSelectionRulesTest.kt b/app/src/test/java/me/maxistar/voiceinbox/FileSelectionRulesTest.kt index 66c712c..605689b 100644 --- a/app/src/test/java/me/maxistar/voiceinbox/FileSelectionRulesTest.kt +++ b/app/src/test/java/me/maxistar/voiceinbox/FileSelectionRulesTest.kt @@ -14,6 +14,12 @@ class FileSelectionRulesTest { ) } + @Test + fun outputCreationUsesMarkdownAndSuggestedInboxName() { + assertEquals("text/markdown", FileSelectionRules.CREATED_OUTPUT_MIME_TYPE) + assertEquals("Voice Inbox.md", FileSelectionRules.DEFAULT_OUTPUT_FILE_NAME) + } + @Test fun providerDisplayNameWins() { assertEquals("notes.txt", FileSelectionRules.displayName("notes.txt", "fallback")) diff --git a/app/src/test/java/me/maxistar/voiceinbox/VoiceInboxPublicLinksTest.kt b/app/src/test/java/me/maxistar/voiceinbox/VoiceInboxPublicLinksTest.kt new file mode 100644 index 0000000..f03799a --- /dev/null +++ b/app/src/test/java/me/maxistar/voiceinbox/VoiceInboxPublicLinksTest.kt @@ -0,0 +1,12 @@ +package me.maxistar.voiceinbox + +import org.junit.Assert.assertEquals +import org.junit.Test + +class VoiceInboxPublicLinksTest { + @Test + fun settingsLinksUseCanonicalVoiceInboxOrigin() { + assertEquals("https://voiceinbox.simpleditor.org/", VoiceInboxPublicLinks.WEBSITE) + assertEquals("https://voiceinbox.simpleditor.org/legal/", VoiceInboxPublicLinks.LEGAL) + } +} diff --git a/fastlane/metadata/android/en-US/changelogs/default.txt b/fastlane/metadata/android/en-US/changelogs/default.txt new file mode 100644 index 0000000..53b4f2b --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/default.txt @@ -0,0 +1,6 @@ +Initial Google Play release. + +• Import individual audio files or select a recording folder +• Transcribe recordings locally after installing the speech model +• Append results to a Markdown or plain-text document +• Review, play, retry, and process recordings from the task list diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt new file mode 100644 index 0000000..8281dfa --- /dev/null +++ b/fastlane/metadata/android/en-US/full_description.txt @@ -0,0 +1,20 @@ +Voice Inbox helps you clear a backlog of voice recordings and collect the recognized text in one portable document. + +Import individual audio files shared from messaging and recording apps, or select a folder that contains multiple recordings. Review new and processed items, preview audio before transcription, and process one recording or the whole queue when convenient. + +Voice Inbox appends each successful transcription to an existing Markdown or plain-text file that you select. The resulting document can be opened in Simple Text Editor or any other compatible editor. Voice Inbox does not require a Simple Text Editor integration or account. + +Key features: +• Import audio shared from other Android apps +• Scan a selected folder for new or changed recordings +• Preview recordings before processing +• Transcribe one file or all new files +• Append results to your existing .md or .txt document +• Review completed and failed tasks and retry failures +• Optionally schedule best-effort background processing + +Speech recognition runs on your device after the speech model is installed. Network access is required to download the model. The initial model download is approximately 640 MiB and installation needs additional free storage. + +Voice Inbox is designed for accumulated recordings rather than live dictation or cloud transcription. Scheduled processing is managed by Android and may run later than the selected time. + +Requires an ARM64 device running Android 7.0 or later. diff --git a/fastlane/metadata/android/en-US/short_description.txt b/fastlane/metadata/android/en-US/short_description.txt new file mode 100644 index 0000000..60c91fa --- /dev/null +++ b/fastlane/metadata/android/en-US/short_description.txt @@ -0,0 +1 @@ +Turn voice recordings into a local Markdown or plain-text inbox. diff --git a/fastlane/metadata/android/en-US/title.txt b/fastlane/metadata/android/en-US/title.txt new file mode 100644 index 0000000..6e76932 --- /dev/null +++ b/fastlane/metadata/android/en-US/title.txt @@ -0,0 +1 @@ +Voice Inbox diff --git a/fastlane/metadata/android/ru-RU/changelogs/default.txt b/fastlane/metadata/android/ru-RU/changelogs/default.txt new file mode 100644 index 0000000..dd32797 --- /dev/null +++ b/fastlane/metadata/android/ru-RU/changelogs/default.txt @@ -0,0 +1,6 @@ +Первый выпуск в Google Play. + +• Импорт отдельных аудиофайлов или выбор папки с записями +• Локальная расшифровка после установки речевой модели +• Добавление результатов в документ Markdown или обычного текста +• Просмотр, прослушивание, повторная и пакетная обработка записей diff --git a/fastlane/metadata/android/ru-RU/full_description.txt b/fastlane/metadata/android/ru-RU/full_description.txt new file mode 100644 index 0000000..2a1ee2a --- /dev/null +++ b/fastlane/metadata/android/ru-RU/full_description.txt @@ -0,0 +1,20 @@ +Voice Inbox помогает разобрать накопившиеся голосовые записи и собрать распознанный текст в одном удобном документе. + +Импортируйте отдельные аудиофайлы из мессенджеров и приложений для записи звука или выберите папку с несколькими записями. Просматривайте новые и обработанные задачи, прослушивайте аудио перед расшифровкой и запускайте обработку одного файла или всей очереди в удобное время. + +Voice Inbox дописывает каждую успешную расшифровку в существующий файл Markdown или обычного текста, который выбираете вы. Получившийся документ можно открыть в Simple Text Editor или любом другом совместимом редакторе. Для этого не требуется интеграция Voice Inbox с Simple Text Editor или учётная запись. + +Основные возможности: +• Импорт аудио из других Android-приложений +• Поиск новых и изменённых записей в выбранной папке +• Прослушивание записей перед обработкой +• Расшифровка одного файла или всех новых файлов +• Добавление результатов в существующий документ .md или .txt +• Просмотр выполненных и неудачных задач и повторная обработка ошибок +• Опциональная фоновая обработка по расписанию + +После установки речевой модели распознавание выполняется прямо на устройстве. Для загрузки модели нужен доступ к интернету. Размер первоначальной загрузки составляет около 640 МиБ, а для установки потребуется дополнительное свободное место. + +Voice Inbox предназначен для накопившихся записей, а не для живой диктовки или облачной транскрипции. Запланированной обработкой управляет Android, поэтому она может начаться позже выбранного времени. + +Требуется ARM64-устройство с Android 7.0 или новее. diff --git a/fastlane/metadata/android/ru-RU/short_description.txt b/fastlane/metadata/android/ru-RU/short_description.txt new file mode 100644 index 0000000..3403032 --- /dev/null +++ b/fastlane/metadata/android/ru-RU/short_description.txt @@ -0,0 +1 @@ +Локально расшифровывайте аудио в Markdown или обычный текст. diff --git a/fastlane/metadata/android/ru-RU/title.txt b/fastlane/metadata/android/ru-RU/title.txt new file mode 100644 index 0000000..6e76932 --- /dev/null +++ b/fastlane/metadata/android/ru-RU/title.txt @@ -0,0 +1 @@ +Voice Inbox diff --git a/shared/src/commonMain/kotlin/me/maxistar/voiceinbox/core/TaskListPresentationController.kt b/shared/src/commonMain/kotlin/me/maxistar/voiceinbox/core/TaskListPresentationController.kt index 79c55d8..cce19f5 100644 --- a/shared/src/commonMain/kotlin/me/maxistar/voiceinbox/core/TaskListPresentationController.kt +++ b/shared/src/commonMain/kotlin/me/maxistar/voiceinbox/core/TaskListPresentationController.kt @@ -36,6 +36,7 @@ enum class TaskActionKind { IMPORT_MODEL, CANCEL_MODEL_DOWNLOAD, RETRY_MODEL_DOWNLOAD, + CREATE_OUTPUT, SELECT_OUTPUT, SELECT_FOLDER, REFRESH_FOLDER, @@ -296,12 +297,15 @@ object TaskListPresentationController { stableId = "setup:output", kind = SetupTaskKind.OUTPUT, state = if (error) SetupTaskState.ERROR else SetupTaskState.REQUIRED, - title = "Select Output File", + title = "Output Document", detail = snapshot.detail, badge = if (error) "Needs attention" else "Required", progress = null, errorMessage = snapshot.detail.takeIf { error }, - actions = listOf(TaskActionPresentation(TaskActionKind.SELECT_OUTPUT, "Select Output File")), + actions = listOf( + TaskActionPresentation(TaskActionKind.CREATE_OUTPUT, "Create New"), + TaskActionPresentation(TaskActionKind.SELECT_OUTPUT, "Choose Existing"), + ), ) } diff --git a/shared/src/commonTest/kotlin/me/maxistar/voiceinbox/core/TaskListPresentationControllerTest.kt b/shared/src/commonTest/kotlin/me/maxistar/voiceinbox/core/TaskListPresentationControllerTest.kt index ec28530..82c7c3b 100644 --- a/shared/src/commonTest/kotlin/me/maxistar/voiceinbox/core/TaskListPresentationControllerTest.kt +++ b/shared/src/commonTest/kotlin/me/maxistar/voiceinbox/core/TaskListPresentationControllerTest.kt @@ -38,6 +38,26 @@ class TaskListPresentationControllerTest { assertTrue(state.tasks.none { it.stableId == "setup:folder" }) } + @Test + fun outputSetupOffersCreationBeforeExistingDocumentSelection() { + val task = assertIs( + state(output = OutputSetupSnapshot(OutputSetupSnapshotState.REQUIRED)).tasks.single(), + ) + + assertEquals("Output Document", task.title) + assertEquals( + listOf(TaskActionKind.CREATE_OUTPUT, TaskActionKind.SELECT_OUTPUT), + task.actions.map { it.kind }, + ) + assertEquals(listOf("Create New", "Choose Existing"), task.actions.map { it.label }) + + val invalid = assertIs( + state(output = OutputSetupSnapshot(OutputSetupSnapshotState.INVALID, "Access expired")).tasks.single(), + ) + assertEquals("Access expired", invalid.errorMessage) + assertEquals(task.actions, invalid.actions) + } + @Test fun activeModelInstallationUsesSuppliedPhaseAndNeutralFallback() { val download = assertIs( diff --git a/website/src/pages/legal.astro b/website/src/pages/legal.astro index cc7e152..c67022e 100644 --- a/website/src/pages/legal.astro +++ b/website/src/pages/legal.astro @@ -3,6 +3,13 @@ import Layout from '../layouts/Layout.astro'; const githubUrl = 'https://github.com/maxistar/Voice-Inbox'; const releaseUrl = `${githubUrl}/releases`; +const licenseUrl = `${githubUrl}/blob/master/LICENSE`; +const thirdPartyNoticesUrl = `${githubUrl}/blob/master/THIRD_PARTY_NOTICES.md`; +const modelNoticesUrl = `${githubUrl}/blob/master/MODEL_NOTICES.md`; +const baseModelUrl = 'https://huggingface.co/nvidia/parakeet-tdt-0.6b-v3'; +const convertedModelUrl = 'https://huggingface.co/istupakov/parakeet-tdt-0.6b-v3-onnx'; +const modelRevisionUrl = `${convertedModelUrl}/tree/8f23f0c03c8761650bdb5b40aaf3e40d2c15f1ce`; +const ccByUrl = 'https://creativecommons.org/licenses/by/4.0/'; ---