Skip to content

Commit

Permalink
Merge pull request #10 from umjammer/0.1.8
Browse files Browse the repository at this point in the history
0.1.8
  • Loading branch information
umjammer committed Feb 19, 2024
2 parents 15ddfb6 + 0beba13 commit 865da8d
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 132 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
Expand All @@ -43,7 +43,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand All @@ -68,4 +68,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
44 changes: 0 additions & 44 deletions .github/workflows/maven-publish.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: grep "<version>" pom.xml | head -1 | grep -v SNAPSHOT

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand Down
36 changes: 14 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![GitHub Packages](https://github.com/umjammer/vavi-speech/actions/workflows/maven-publish.yml/badge.svg)](https://github.com/umjammer?tab=packages&repo_name=vavi-speech)
[![Java CI with Maven](https://github.com/umjammer/vavi-speech/workflows/Java%20CI%20with%20Maven/badge.svg)](https://github.com/umjammer/vavi-speech/actions)
[![Release](https://jitpack.io/v/umjammer/vavi-speech.svg)](https://jitpack.io/#umjammer/vavi-speech)
[![Java CI](https://github.com/umjammer/vavi-speech/workflows/Java%20CI%20with%20Maven/badge.svg)](https://github.com/umjammer/vavi-speech/actions)
[![CodeQL](https://github.com/umjammer/vavi-speech/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/umjammer/vavi-speech/actions/workflows/codeql-analysis.yml)
![Java](https://img.shields.io/badge/Java-17-b07219)
[![Parent](https://img.shields.io/badge/Parent-vavi--speech2-pink)](https://github.com/umjammer/vavi-speech2)
Expand All @@ -8,15 +8,15 @@

Text to Speech (JSAPI) engines for Java and Japanese phonemeizers

| **Type** | **Description** | **Staus** | **SPI Status** | **Quality** | **Comment** |
|:---------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------:|:--------------:|:-----------:|:-------------|
| [AquesTalk](https://www.a-quest.com/products/aquestalk.html) | JNI ||| 😐 | 32bit only |
| AquesTalk | JNA ||| 😐 | 32bit only |
| AquesTalk2 | JNI | - | - | | |
| AquesTalk10 | JNA ||| 😐 | |
| Google Cloud Text To Speech | [Google Cloud Text To Speech](https://cloud.google.com/text-to-speech/docs/quickstart-client-libraries) ||| 👑 | |
| Rococoa | [Rococoa](https://github.com/iterate-ch/rococoa/blob/d5fdd3b884d5f044bc0b168aff66e5f52a014da8/rococoa/rococoa-contrib/src/test/java/org/rococoa/contrib/appkit/NSSpeechSynthesizerTest.java), JNA ||| 😃 | |
| FreeTTS | [FreeTTS](https://github.com/umjammer/FreeTTS/) | - || 💩 | not included |
| **Type** | **Description** | **Staus** | **SPI Status** | **Quality** | **Comment** |
|:---------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------:|:--------------:|:-----------:|:-------------------------|
| [AquesTalk](https://www.a-quest.com/products/aquestalk.html) | JNI ||| 😐 | 32bit only |
| AquesTalk | JNA ||| 😐 | 32bit only |
| AquesTalk2 | JNI | - | - | | mac: intel only |
| AquesTalk10 | JNA ||| 😐 | mac: intel only |
| Google Cloud Text To Speech | [Google Cloud Text To Speech](https://cloud.google.com/text-to-speech/docs/quickstart-client-libraries) ||| 👑 | |
| Rococoa | [Rococoa](https://github.com/iterate-ch/rococoa/blob/d5fdd3b884d5f044bc0b168aff66e5f52a014da8/rococoa/rococoa-contrib/src/test/java/org/rococoa/contrib/appkit/NSSpeechSynthesizerTest.java), JNA ||| 😃 | |
| FreeTTS | [FreeTTS](https://github.com/umjammer/FreeTTS/) | - || 💩 | not included (test only) |

## Kanji -> Kana converter

Expand Down Expand Up @@ -44,9 +44,7 @@ selected by `aquestalk10.properties`

### meven

* https://github.com/umjammer/vavi-speech/packages/1691244
* this project uses gitlab package registry. add a personal access token to `~/.m2/settings.xml`
* see https://docs.gitlab.com/ee/user/packages/maven_repository/index.html#authenticate-to-the-package-registry-with-maven
* https://jitpack.io/#umjammer/vavi-speech

### AquesTalk10

Expand All @@ -59,12 +57,6 @@ selected by `aquestalk10.properties`
* [get token as json](https://cloud.google.com/text-to-speech/docs/quickstart-client-libraries)
* set environment variable `"GOOGLE_APPLICATION_CREDENTIALS"` `your_json_path`

### Rococoa

* locate `librococoa.dylib` into class path
* if you use maven it's already done, you can find it at `target/test-classes`.
* ~~rococoa doesn't work w/ current jna version 5.5.0, run w/ version 3.4.0~~

### Sen

```shell
Expand Down Expand Up @@ -153,7 +145,7 @@ phonemer=vavi.speech.phoneme.KuromojiJaPhonemer
* ~~extract rules as json~~ ([done](src/main/resources/vavi/speech/modifier/yakuwarigo/salome/rule.json))
* ずんだもん ([wip](src/main/resources/vavi/speech/modifier/yakuwarigo/zundamon/rule.json))
* unify japanese tokenizer (lucene-gosen?)
* AVSpeechSynthesizer needs block
* AVSpeechSynthesizer needs obj-c block

### Morphological Analyzer

Expand All @@ -179,7 +171,7 @@ phonemer=vavi.speech.phoneme.KuromojiJaPhonemer

### Kanji -> Kana

* chawan (lost in the internet)
* chawan (faded away from the internet)
* ~~[open jtalk](https://github.com/r9y9/open_jtalk) njd*~~ -> [Gyutan](https://github.com/umjammer/Gyutan)
* http://kakasi.namazu.org/index.html.ja
* https://github.com/nicolas-raoul/kakasi-java (predecessor of jakaroma)
Expand Down
2 changes: 2 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
jdk:
- openjdk17
95 changes: 34 additions & 61 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@

<groupId>vavi</groupId>
<artifactId>vavi-speech</artifactId>
<version>0.1.7</version>
<version>0.1.8</version>

<name>vavi-speech</name>
<description>
TODO

use macos framework</description>
<description/>
<url>https//github.com/umjammer/vavi-speech</url>
<scm>
<url>https//github.com/umjammer/vavi-speech</url>
Expand All @@ -24,17 +21,10 @@ TODO
</issueManagement>

<properties>
<rococoa.version>0.8.6</rococoa.version>
<freetts.version>1.2.4</freetts.version>
<freetts.groupId>com.github.umjammer.FreeTTS</freetts.groupId> <!-- org.jvoicexml / com.github.umjammer.FreeTTS -->
<freetts.version>1.2.5</freetts.version>
</properties>

<distributionManagement>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/umjammer/vavi-speech</url>
</repository>
</distributionManagement>

<profiles>
<profile>
<id>local (not on CI)</id>
Expand Down Expand Up @@ -99,6 +89,7 @@ TODO
</plugins>
</build>
</profile>

<profile>
<id>github workflow</id>
<activation>
Expand Down Expand Up @@ -128,6 +119,7 @@ TODO
</plugins>
</build>
</profile>

<profile>
<id>32bit</id>
<activation>
Expand Down Expand Up @@ -211,8 +203,7 @@ TODO
<release>17</release>
</configuration>
</plugin>
<!--
-->

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native2ascii-maven-plugin</artifactId>
Expand All @@ -230,40 +221,10 @@ TODO
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>copy</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.rococoa</groupId>
<artifactId>rococoa-core</artifactId>
<type>dylib</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
<destFileName>librococoa.dylib</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<repositories>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/umjammer/*</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
Expand Down Expand Up @@ -305,20 +266,26 @@ TODO
<version>1.1.10</version>
</dependency>
<dependency> <!-- JSAPI1 -->
<groupId>javax.speech</groupId>
<artifactId>speech</artifactId>
<version>1.0.0</version>
<groupId>com.github.umjammer</groupId>
<artifactId>javax-speech</artifactId>
<version>1.0.1</version>
</dependency>

<dependency>
<groupId>vavi</groupId>
<groupId>com.github.umjammer</groupId>
<artifactId>vavi-sound-sandbox</artifactId>
<version>1.0.6</version>
<version>1.0.7</version>
<exclusions>
<exclusion>
<artifactId>jmf</artifactId>
<groupId>javax.media</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.rococoa</groupId>
<groupId>com.github.umjammer.rococoa</groupId> <!-- org.rococoa / com.github.umjammer.rococoa -->
<artifactId>rococoa-core</artifactId>
<version>${rococoa.version}</version>
<version>0.8.7</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
Expand All @@ -343,24 +310,30 @@ TODO
<dependency>
<groupId>com.worksap.nlp</groupId>
<artifactId>sudachi</artifactId>
<version>0.7.1</version>
<version>0.7.3</version>
</dependency>

<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>72.1</version>
<version>74.1</version>
</dependency>

<dependency>
<groupId>com.github.umjammer</groupId>
<artifactId>vavi-util-screenscraping</artifactId>
<version>1.0.13</version>
<exclusions>
<exclusion>
<artifactId>vavi-net-auth-amazon</artifactId>
<groupId>com.github.umjammer.vavi-net-auth</groupId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.jvoicexml</groupId>
<artifactId>freetts_jsapi10</artifactId>
<groupId>${freetts.groupId}</groupId>
<artifactId>freetts-jsapi10</artifactId>
<version>${freetts.version}</version>
</dependency>

Expand Down Expand Up @@ -393,7 +366,7 @@ TODO
</dependency>

<dependency>
<groupId>org.jvoicexml</groupId>
<groupId>${freetts.groupId}</groupId>
<artifactId>freetts</artifactId>
<version>${freetts.version}</version>
<scope>test</scope>
Expand All @@ -417,19 +390,19 @@ TODO
</exclusions>
</dependency>
<dependency>
<groupId>org.jvoicexml</groupId>
<groupId>${freetts.groupId}</groupId>
<artifactId>cmulex</artifactId>
<version>${freetts.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jvoicexml</groupId>
<groupId>${freetts.groupId}</groupId>
<artifactId>en_us</artifactId>
<version>${freetts.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jvoicexml</groupId>
<groupId>${freetts.groupId}</groupId>
<artifactId>cmu_us_kal</artifactId>
<version>${freetts.version}</version>
<scope>test</scope>
Expand Down
22 changes: 22 additions & 0 deletions src/test/java/BugTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import java.nio.ByteBuffer;
import java.nio.IntBuffer;

import org.junit.jupiter.api.Test;
import vavi.util.Debug;


/**
* BugTest.
*
* @author <a href="mailto:umjammer@gmail.com">Naohide Sano</a> (nsano)
* @version 0.00 2023-02-08 nsano initial version <br>
*/
public class BugTest {

@Test
void test1() throws Exception {
IntBuffer ib = ByteBuffer.allocateDirect(72463209 * 4).asIntBuffer().asReadOnlyBuffer().duplicate();
Debug.println(ib.getClass().getName() + ", " + ib);
ib.get(0);
}
}
2 changes: 1 addition & 1 deletion src/test/java/FreeTTSTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void speak(String text) throws Exception {
// シンセザイザのモードを指定
System.setProperty("freetts.voices", "com.sun.speech.freetts.en.us.cmu_us_kal.KevinVoiceDirectory");
SynthesizerModeDesc desc = new SynthesizerModeDesc(Locale.US);
Central.registerEngineCentral("com.sun.speech.freetts.jsapi.FreeTTSEngineCentral");
Central.registerEngineCentral("com.sun.speech.engine.freetts.jsapi.FreeTTSEngineCentral");
Synthesizer synthesizer = Central.createSynthesizer(desc);

synthesizer.allocate();
Expand Down

0 comments on commit 865da8d

Please sign in to comment.