-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from N3ther/gui-0.1.0
Gui 0.1.0
- Loading branch information
Showing
14 changed files
with
475 additions
and
220 deletions.
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
eclipse.preferences.version=1 | ||
encoding//src/main/java=UTF-8 | ||
encoding//src/main/java/net/oijon/algonquin/App.java=UTF-8 | ||
encoding//src/main/java/net/oijon/algonquin/tts/IPA.java=UTF-8 | ||
encoding//src/main/resources=UTF-8 | ||
encoding//src/test/java=UTF-8 | ||
encoding/<project>=UTF-8 |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
activeProfiles= | ||
eclipse.preferences.version=1 | ||
resolveWorkspaceProjects=true | ||
version=1 |
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 |
---|---|---|
@@ -0,0 +1,114 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>net.oijon</groupId> | ||
<artifactId>algonquin</artifactId> | ||
<name>algonquin</name> | ||
<version>0.1.0-SNAPSHOT</version> | ||
<description>A text-to-speech program meant to handle the International Phonetic Alphabet</description> | ||
<url>http://github.com/N3ther/Algonquin-TTS</url> | ||
<developers> | ||
<developer> | ||
<name>Alex Cramer</name> | ||
<email>[email protected]</email> | ||
</developer> | ||
</developers> | ||
<licenses> | ||
<license> | ||
<name>The Apache License, Version 2.0</name> | ||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> | ||
</license> | ||
</licenses> | ||
<scm> | ||
<connection>scm:git:git://github.com/N3ther/Algonquin-TTS.git</connection> | ||
<developerConnection>scm:git:ssh://github.com:N3ther/Algonquin-TTS.git</developerConnection> | ||
<url>http://github.com/N3ther/Algonquin-TTS/tree/master</url> | ||
</scm> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>attach-javadocs</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>net.nicoulaj.maven.plugins</groupId> | ||
<artifactId>checksum-maven-plugin</artifactId> | ||
<version>1.10</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>artifacts</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration /> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>3.2.1</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<transformers> | ||
<transformer> | ||
<mainClass>net.oijon.algonquin.gui.GUILauncher</mainClass> | ||
</transformer> | ||
</transformers> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.openjfx</groupId> | ||
<artifactId>javafx-maven-plugin</artifactId> | ||
<version>0.0.8</version> | ||
<configuration> | ||
<mainClass>net.oijon.algonquin.gui.GUI</mainClass> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>3.8.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.openjfx</groupId> | ||
<artifactId>javafx-base</artifactId> | ||
<version>19-ea+5</version> | ||
<type>pom</type> | ||
<scope>compile</scope> | ||
</dependency> | ||
</dependencies> | ||
<properties> | ||
<maven.compiler.target>17</maven.compiler.target> | ||
<maven.compiler.source>17</maven.compiler.source> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
</properties> | ||
</project> |
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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package net.oijon.algonquin.gui; | ||
|
||
import javafx.application.Application; | ||
import javafx.event.ActionEvent; | ||
import javafx.event.EventHandler; | ||
import javafx.geometry.Insets; | ||
import javafx.geometry.Pos; | ||
import javafx.scene.Scene; | ||
import javafx.scene.control.Button; | ||
import javafx.scene.control.Label; | ||
import javafx.scene.control.TextArea; | ||
import javafx.scene.layout.GridPane; | ||
import javafx.scene.layout.HBox; | ||
import javafx.scene.layout.VBox; | ||
import javafx.stage.Stage; | ||
|
||
import net.oijon.algonquin.tts.IPA; | ||
|
||
public class GUI extends Application { | ||
|
||
@Override | ||
public void start(Stage primaryStage) throws Exception { | ||
//pre-startup | ||
VBox mainBox = new VBox(); | ||
mainBox.setAlignment(Pos.CENTER); | ||
mainBox.setSpacing(5); | ||
|
||
HBox pronounceBox = new HBox(); | ||
pronounceBox.setAlignment(Pos.CENTER); | ||
GridPane pronounceGrid = new GridPane(); | ||
pronounceGrid.setAlignment(Pos.CENTER); | ||
pronounceGrid.setHgap(10); | ||
pronounceGrid.setVgap(10); | ||
pronounceGrid.setPadding(new Insets(25, 25, 25, 25)); | ||
|
||
Label insertIPA = new Label("Insert IPA:"); | ||
TextArea insert = new TextArea("hɛloʊ ænd wɛlkəm tu ælgonkwɪn tɛkst tu spitʃ"); | ||
Button pronounceButton = new Button("Pronounce!"); | ||
|
||
pronounceButton.setOnAction(new EventHandler<ActionEvent>() { | ||
|
||
@Override | ||
public void handle(ActionEvent event) { | ||
IPA.createAudio(IPA.getFileNames(insert.getText())); | ||
} | ||
}); | ||
|
||
pronounceGrid.add(insertIPA, 0, 1); | ||
pronounceGrid.add(insert, 0, 2); | ||
pronounceGrid.add(pronounceButton, 0, 3); | ||
|
||
pronounceBox.getChildren().addAll(pronounceGrid); | ||
|
||
Label consoleLabel = new Label("Console"); | ||
TextArea console = new TextArea(); | ||
|
||
|
||
mainBox.getChildren().addAll(pronounceBox, consoleLabel, console); | ||
|
||
Scene scene = new Scene(mainBox, 500, 500); | ||
primaryStage.setScene(scene); | ||
primaryStage.setTitle("Algonquin Text-to-Speach"); | ||
primaryStage.show(); | ||
|
||
|
||
} | ||
|
||
public static void main(String[] args) { | ||
launch(args); | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package net.oijon.algonquin.gui; | ||
|
||
public class GUILauncher { | ||
|
||
public static void main(String[] args) { | ||
GUI.main(args); | ||
} | ||
|
||
} |
Oops, something went wrong.