Skip to content
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

0.0.2 #1

Merged
merged 5 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .github/workflows/maven-publish.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
local.properties
tmp/
sudachi
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
[![Release](https://jitpack.io/v/umjammer/vavi-net-auth-mac.svg)](https://jitpack.io/#umjammer/vavi-net-auth-mac)
[![Java CI](https://github.com/umjammer/vavi-net-auth-mac/actions/workflows/maven.yml/badge.svg)](https://github.com/umjammer/vavi-net-auth-mac/actions/workflows/maven.yml)
[![CodeQL](https://github.com/umjammer/vavi-net-auth-mac/actions/workflows/codeql.yml/badge.svg)](https://github.com/umjammer/vavi-net-auth-mac/actions/workflows/codeql-analysis.yml)
[![Release](https://jitpack.io/v/umjammer/vavi-speech-rpc.svg)](https://jitpack.io/#umjammer/vavi-speech-rpc)
[![Java CI](https://github.com/umjammer/vavi-speech-rpc/actions/workflows/maven.yml/badge.svg)](https://github.com/umjammer/vavi-speech-rpc/actions/workflows/maven.yml)
[![CodeQL](https://github.com/umjammer/vavi-speech-rpc/actions/workflows/codeql.yml/badge.svg)](https://github.com/umjammer/vavi-speech-rpc/actions/workflows/codeql.yml)
![Java](https://img.shields.io/badge/Java-17-b07219)

# vavi-net-auth-mac
# vavi-speech-rpc

 mac chrome cookie
RPC client/server for JSR-113 JSAPI2

### sample

* make AquesTalk10 work on arm64 mac. run rcp server on Rosetta2, then call rpc speech synthesizer.

## Install

* [maven](https://jitpack.io/#umjammer/vavi-net-auth-mac)
* [maven](https://jitpack.io/#umjammer/vavi-speech-rpc)

## Usage

* [vavi-speech-sandbox](https://jitpack.io/#umjammer/vavi-speech-sandbox)
[sample](src/test/java/vavi/speech/rpc/jsapi2/TestCase.java)

## References

* [macos](https://gist.github.com/kosh04/36cf6023fb75b516451ce933b9db2207)
* [windows](https://stackoverflow.com/questions/60230456/dpapi-fails-with-cryptographicexception-when-trying-to-decrypt-chrome-cookies/60611673#60611673)
* [jersey post server](https://stackoverflow.com/questions/29183274/jax-rs-jersey-rest-webservice-posting-a-array-generated-by-input-from-user)
* [jersey post client](https://qiita.com/noobar/items/a96e07e441241b1e0215)
* [jersey DI](https://qiita.com/atti/items/3f6f43c5168323344427)

## TODO

* gemini
* starting .app is unbelievably slow
* server side, speech engine spi pluggable, specifiable
17 changes: 17 additions & 0 deletions local.properties.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
sen.home=/usr/local/src/sen

aquesTalk10DevKey=XXXX-XXXX-XXXX-XXXX
aquesTalk2DevKey=ZZZZ-ZZZZ-ZZZZ-ZZZZ
aqKanji2KoeDevKey=YYYY-YYYY-YYYY-YYYY

google.credential=tmp/google-app-credentials.json

docomo.goo.hiragana.apiKey=123456789

recruit.proofreading.apiKey=AABBCC456

yahoo.japan.apiKey=abc123

voicevox.url=http://localhost:50021/

intel.jdk.home=/Users/foo/Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home
194 changes: 175 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,129 @@
<modelVersion>4.0.0</modelVersion>

<groupId>vavi</groupId>
<artifactId>vavi-net-auth-mac</artifactId>
<version>0.0.1</version>
<artifactId>vavi-speech-rpc</artifactId>
<version>0.0.2</version>

<properties>
<jsapi2.groupId>com.github.umjammer.jsapi</jsapi2.groupId> <!-- org.jvoicexml / com.github.umjammer.jsapi -->
<jsapi2.version>0.6.6</jsapi2.version>

<javapackager.name>jsapi-server</javapackager.name>
</properties>

<profiles>
<profile>
<id>release</id>
<activation>
<file>
<exists>${basedir}/local.properties</exists>
</file>
<os>
<family>mac</family>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>read-properties</id>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${basedir}/local.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>4.9.10</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
<phase>initialize</phase>
</execution>
</executions>
<configuration>
<generateGitPropertiesFile>false</generateGitPropertiesFile>
<includeOnlyProperties>
<includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
</includeOnlyProperties>
<commitIdGenerationMode>full</commitIdGenerationMode>
</configuration>
</plugin>

<plugin>
<groupId>io.github.fvarrui</groupId>
<artifactId>javapackager</artifactId>
<version>1.7.5</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>package</goal>
</goals>
<configuration>
<name>${javapackager.name}</name>
<organizationName>Copyright © 2024 by vavi, All rights reserved.</organizationName>

<mainClass>vavi.speech.rpc.jsapi2.server.Main</mainClass>
<runnableJar>${project.artifactId}-${project.version}.jar</runnableJar>
<generateInstaller>false</generateInstaller>
<bundleJre>true</bundleJre>
<jdkPath>${intel.jdk.home}</jdkPath>
<jreMinVersion>17</jreMinVersion>

<assetsDir>src/main/package</assetsDir>

<additionalResources>
<additionalResource>${project.build.testResources[0].directory}/logging.properties</additionalResource>
<additionalResource>${project.build.testResources[0].directory}/aquestalk10.properties</additionalResource>
<additionalResource>local.properties</additionalResource>
</additionalResources>

<vmArgs>
<vmArg>-Dapple.laf.useScreenMenuBar=true</vmArg>
<vmArg>-Djava.util.logging.config.file=./logging.properties</vmArg>
<vmArg>-Dvavi.util.logging.VaviFormatter.extraClassMethod=org\\.slf4j\\.jul\\.JDK14LoggerAdapter#.*</vmArg>
</vmArgs>

<macConfig>
<!-- true cause error -->
<codesignApp>false</codesignApp>
<generatePkg>false</generatePkg>
<infoPlist>
<additionalEntries>
<![CDATA[
<key>CFBundleName</key>
<string>${javapackager.name}</string>
<key>CFBundleShortVersionString</key>
<string>${git.build.time}</string>
]]>
</additionalEntries>
</infoPlist>
</macConfig>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
Expand Down Expand Up @@ -43,7 +164,14 @@
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.10.1</version>
<version>5.10.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
<version>3.1.5</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -57,23 +185,58 @@
<version>1.1.10</version>
</dependency>

<!-- jspai2 -->
<dependency>
<groupId>com.github.umjammer.vavi-net-auth</groupId> <!-- vavi / com.github.umjammer.vavi-net-auth -->
<artifactId>vavi-net-auth-common</artifactId>
<version>0.1.9</version>
<groupId>${jsapi2.groupId}</groupId>
<artifactId>javax.speech</artifactId>
<version>${jsapi2.version}</version>
</dependency>

<dependency>
<groupId>com.github.umjammer</groupId>
<artifactId>vavi-crypto-sandbox</artifactId>
<version>1.0.3</version>
<groupId>com.github.umjammer</groupId> <!-- vavi / com.github.umjammer -->
<artifactId>vavi-speech2</artifactId>
<version>0.0.13</version>
</dependency>

<!-- client -->
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.45.0.0</version>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>

<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-jetty-http</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>2.0.11</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.11</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
Expand All @@ -90,12 +253,5 @@
<artifactId>junit-platform-commons</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.7.36</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Loading
Loading