From 31743726a8f275dbc6c4f91d4b1f056347c3e486 Mon Sep 17 00:00:00 2001 From: Nanashi Date: Fri, 17 Nov 2023 23:16:57 +0900 Subject: [PATCH] =?UTF-8?q?Add:=20Android=E3=81=A7=E3=81=AE=E6=B3=A8?= =?UTF-8?q?=E6=84=8F=E3=82=92=E8=BF=BD=E5=8A=A0=20(#682)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/voicevox_core_java_api/lib/build.gradle | 1 + .../src/main/java/jp/hiroshiba/voicevoxcore/OpenJtalk.java | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/crates/voicevox_core_java_api/lib/build.gradle b/crates/voicevox_core_java_api/lib/build.gradle index 80eceaa82..06ceaeb14 100644 --- a/crates/voicevox_core_java_api/lib/build.gradle +++ b/crates/voicevox_core_java_api/lib/build.gradle @@ -50,6 +50,7 @@ java { } withJavadocJar() + withSourcesJar() } tasks.named('test') { // Use JUnit Platform for unit tests. diff --git a/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/OpenJtalk.java b/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/OpenJtalk.java index 032ec1b76..11cb3c587 100644 --- a/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/OpenJtalk.java +++ b/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/OpenJtalk.java @@ -23,6 +23,13 @@ protected void finalize() throws Throwable { * *

この関数を呼び出した後にユーザー辞書を変更した場合は、再度この関数を呼ぶ必要がある。 * + *

Androidの場合、この関数を呼び出す前に {@code TMPDIR} 環境変数を設定する必要がある。 + * + *

{@code
+   * Activity activity = ...;
+   * Os.setenv("TMPDIR", activity.getCacheDir().getAbsolutePath(), true);
+   * }
+ * * @param userDict ユーザー辞書。 */ public void useUserDict(UserDict userDict) {