forked from VOICEVOX/voicevox
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate: Java APIを使うように #37
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3153603
WIP: Java APIを使う用に
sevenc-nanashi 28baaa6
Fix: クラッシュを修正
sevenc-nanashi af9c6de
Fix: ESLintを有効化
sevenc-nanashi fb5afce
Change: CAPACITOR_ADDRESS環境変数でいじるように
sevenc-nanashi 3fb713c
Fix: CIを修正
sevenc-nanashi f2c757a
Fix: コメントを修正
sevenc-nanashi bf581d9
Change: デフォルトで検出するように
sevenc-nanashi df6bb37
Fix: metas.jsonを使う用に
sevenc-nanashi a958ffb
Change: metasをマージするように
sevenc-nanashi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ VITE_DEFAULT_ENGINE_INFOS=`[ | |
} | ||
]` | ||
VITE_GTM_CONTAINER_ID=GTM-DUMMY | ||
CAPACITOR_ADDRESS= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ VITE_DEFAULT_ENGINE_INFOS=`[ | |
} | ||
]` | ||
VITE_GTM_CONTAINER_ID=GTM-DUMMY | ||
CAPACITOR_ADDRESS= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,6 @@ android { | |
|
||
ndkVersion '25.2.9519653' | ||
namespace 'jp.hiroshiba.voicevox' | ||
externalNativeBuild { | ||
cmake { | ||
path file('src/main/cpp/CMakeLists.txt') | ||
version '3.22.1' | ||
} | ||
} | ||
Comment on lines
-7
to
-12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. C++に勝利しました。やったぜ |
||
|
||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
defaultConfig { | ||
|
@@ -24,12 +18,6 @@ android { | |
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61 | ||
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~' | ||
} | ||
externalNativeBuild { | ||
cmake { | ||
arguments '-DANDROID_STL=c++_shared' | ||
} | ||
} | ||
ndk.abiFilters 'arm64-v8a', 'x86_64' | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
|
||
|
@@ -53,6 +41,25 @@ repositories { | |
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs' | ||
} | ||
} | ||
def urlZipFile = { name, path, url -> | ||
File zipFile = new File("$buildDir/download/${name}.zip") | ||
zipFile.parentFile.mkdirs() | ||
if (!zipFile.exists()) { | ||
new URL(url).withInputStream { downloadStream -> | ||
zipFile.withOutputStream { fileOut -> | ||
fileOut << downloadStream | ||
} | ||
} | ||
} | ||
def tree = zipTree(zipFile) | ||
def fileName = path.split("/")[-1] | ||
def outFile = file("$buildDir/download/${fileName}") | ||
tree.visit { file -> | ||
if (file.getPath() != path) return | ||
file.copyTo(outFile) | ||
} | ||
files(outFile) | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(include: ['*.jar'], dir: 'libs') | ||
|
@@ -66,7 +73,19 @@ dependencies { | |
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" | ||
implementation project(':capacitor-cordova-android-plugins') | ||
|
||
implementation group: 'com.microsoft.onnxruntime', name: 'onnxruntime-android', version: '1.14.0' | ||
// TODO: ちゃんと公開されたらそれに置き換える | ||
implementation urlZipFile("voicevoxcore-android", "jp/hiroshiba/voicevoxcore/voicevoxcore-android/0.15.0-preview.13/voicevoxcore-android-0.15.0-preview.13.aar", "https://github.com/VOICEVOX/voicevox_core/releases/download/0.15.0-preview.13/java_packages.zip") | ||
|
||
// https://mvnrepository.com/artifact/com.google.code.gson/gson | ||
implementation group: 'com.google.code.gson', name: 'gson', version: "2.10.1" | ||
|
||
// https://mvnrepository.com/artifact/jakarta.validation/jakarta.validation-api | ||
implementation group: 'jakarta.validation', name: 'jakarta.validation-api', version: "3.0.2" | ||
|
||
// https://mvnrepository.com/artifact/jakarta.annotation/jakarta.annotation-api | ||
implementation group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: "2.1.1" | ||
|
||
implementation group: 'com.microsoft.onnxruntime', name: 'onnxruntime-android', version: "1.14.0" | ||
Hiroshiba marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
apply from: 'capacitor.build.gradle' | ||
|
This file was deleted.
Oops, something went wrong.
181 changes: 0 additions & 181 deletions
181
android/app/src/main/cpp/voicevox_core_wrapper/core_caller.cpp
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jsonファイルが大きくなりすぎて(51MB近く)大変なことになってたので分割。