Skip to content

Commit

Permalink
Merge pull request #2 from N3ther/gui-0.1.0
Browse files Browse the repository at this point in the history
Gui 0.1.0
  • Loading branch information
alexdcramer committed Apr 29, 2022
2 parents 7f4e756 + 5024dca commit 14a5f3b
Show file tree
Hide file tree
Showing 14 changed files with 475 additions and 220 deletions.
1 change: 0 additions & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<attributes>
<attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
Expand Down
2 changes: 1 addition & 1 deletion .settings/org.eclipse.core.resources.prefs
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
2 changes: 1 addition & 1 deletion .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=17
4 changes: 4 additions & 0 deletions .settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
114 changes: 114 additions & 0 deletions dependency-reduced-pom.xml
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>
123 changes: 79 additions & 44 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>net.oijon</groupId>
<artifactId>algonquin</artifactId>
<version>0.0.1</version>
<version>0.1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>algonquin</name>
Expand All @@ -30,64 +30,99 @@
<artifactId>stdlib</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<version>19-ea+5</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>19-ea+5</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>19-ea+5</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
</dependency>


</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<id>attach-sources</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>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<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>
<!-- put your configurations here -->
</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 implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<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>
<!-- put your configurations here -->
<mainClass>net.oijon.algonquin.gui.GUI</mainClass>
</configuration>
</plugin>
<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>net.oijon.algonquin.App</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugin>
</plugins>
</build>
<licenses>
Expand Down
72 changes: 72 additions & 0 deletions src/main/java/net/oijon/algonquin/gui/GUI.java
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);
}

}
9 changes: 9 additions & 0 deletions src/main/java/net/oijon/algonquin/gui/GUILauncher.java
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);
}

}
Loading

0 comments on commit 14a5f3b

Please sign in to comment.