Skip to content

Commit b8ad9f1

Browse files
committed
Merge pull request #66 from amplexus/master
Added support for Google Voice API v2 and code cleanup
2 parents b8021c9 + e429759 commit b8ad9f1

22 files changed

+267
-110
lines changed

.classpath

Lines changed: 0 additions & 6 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
/bin
22
.classpath
3+
.project
4+
/target

.project

Lines changed: 0 additions & 16 deletions
This file was deleted.

README.markdown

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ The API currently provides the following functionality,
2323
* Wave to FLAC API (Wrapped around the used API in the project, javaFlacEncoder, see CREDITS)
2424
* A translator using Google Translate (courtesy of Skylion's Google Toolkit)
2525

26+
##Notes
27+
28+
To get access to the Google API, you need an API key. To get this, you need to follow the instructions here:
29+
* https://stackoverflow.com/questions/26485531/google-speech-api-v2
30+
31+
Info on how to publish this library as a Maven artifact can be found here:
32+
* http://datumedge.blogspot.co.uk/2012/05/publishing-from-github-to-maven-central.html
33+
34+
A sample application using this library can be found here:
35+
* https://github.com/amplexus/java-speech-api-demo
36+
2637
##Changelog
2738
See CHANGELOG.markdown for Version History/Changelog
2839

java-speech-api.iml

Lines changed: 0 additions & 13 deletions
This file was deleted.

pom.xml

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<groupId>com.darkprograms.speech</groupId>
6+
<artifactId>java-speech-api</artifactId>
7+
<version>1.13.0-SNAPSHOT</version>
8+
<packaging>jar</packaging>
9+
10+
<properties>
11+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
12+
</properties>
13+
14+
<name>java-speech-api</name>
15+
<url>https://github.com/lkuza2/java-speech-api/</url>
16+
17+
<description>
18+
The J.A.R.V.I.S. Speech API is designed to be simple and efficient, using the speech engines created by Google to provide functionality for parts of the API. Essentially, it is an API written in Java, including a recognizer, synthesizer, and a microphone capture utility. The project uses Google services for the synthesizer and recognizer. While this requires an Internet connection, it provides a complete, modern, and fully functional speech API in Java.
19+
</description>
20+
21+
<scm>
22+
<connection>scm:git:git://github.com/lkuza2/java-speech-api.git</connection>
23+
<developerConnection>scm:git:git@github.com:lkuza2/java-speech-api.git</developerConnection>
24+
<url>http://github.com/lkuza2/java-speech-api</url>
25+
</scm>
26+
27+
<licenses>
28+
<license>
29+
<name>GNU GPL(v3)</name>
30+
<url>https://github.com/lkuza2/java-speech-api/blob/master/LICENSE</url>
31+
</license>
32+
</licenses>
33+
34+
<issueManagement>
35+
<system>GitHub</system>
36+
<url>https://github.com/lkuza2/java-speech-api/issues/</url>
37+
</issueManagement>
38+
39+
<developers>
40+
<developer>
41+
<id>https://github.com/Skylion007</id>
42+
<name>Skylion007</name>
43+
</developer>
44+
<developer>
45+
<id>https://github.com/lkuza2</id>
46+
<name>lkuza2</name>
47+
</developer>
48+
<developer>
49+
<id>https://github.com/AdamuKaapan</id>
50+
<name>AdamuKaapan</name>
51+
</developer>
52+
<developer>
53+
<id>https://github.com/duncanj</id>
54+
<name>duncanj</name>
55+
</developer>
56+
<developer>
57+
<id>https://github.com/Iegorchenkov</id>
58+
<name>Iegorchenkov</name>
59+
</developer>
60+
<developer>
61+
<id>https://github.com/xingrz</id>
62+
<name>xingrz</name>
63+
</developer>
64+
<developer>
65+
<id>https://github.com/ClusterM</id>
66+
<name>ClusterM</name>
67+
</developer>
68+
<developer>
69+
<id>https://github.com/AranHase</id>
70+
<name>AranHase</name>
71+
</developer>
72+
</developers>
73+
74+
<dependencies>
75+
<dependency>
76+
<groupId>net.sourceforge.javaflacencoder</groupId>
77+
<artifactId>java-flac-encoder</artifactId>
78+
<version>0.3.7</version>
79+
</dependency>
80+
<dependency>
81+
<groupId>org.json</groupId>
82+
<artifactId>json</artifactId>
83+
<version>20150729</version>
84+
</dependency>
85+
</dependencies>
86+
87+
<build>
88+
<plugins>
89+
<plugin>
90+
<groupId>org.apache.maven.plugins</groupId>
91+
<artifactId>maven-release-plugin</artifactId>
92+
<version>2.2.2</version>
93+
<configuration>
94+
<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
95+
</configuration>
96+
</plugin>
97+
<plugin>
98+
<groupId>org.apache.maven.plugins</groupId>
99+
<artifactId>maven-source-plugin</artifactId>
100+
<executions>
101+
<execution>
102+
<id>attach-sources</id>
103+
<goals>
104+
<goal>jar</goal>
105+
</goals>
106+
</execution>
107+
</executions>
108+
</plugin>
109+
<plugin>
110+
<groupId>org.apache.maven.plugins</groupId>
111+
<artifactId>maven-javadoc-plugin</artifactId>
112+
<executions>
113+
<execution>
114+
<id>attach-javadocs</id>
115+
<goals>
116+
<goal>jar</goal>
117+
</goals>
118+
</execution>
119+
</executions>
120+
</plugin>
121+
</plugins>
122+
</build>
123+
124+
<distributionManagement>
125+
<snapshotRepository>
126+
<id>sonatype-nexus-snapshots</id>
127+
<name>Sonatype Nexus snapshot repository</name>
128+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
129+
</snapshotRepository>
130+
<repository>
131+
<id>sonatype-nexus-staging</id>
132+
<name>Sonatype Nexus release repository</name>
133+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
134+
</repository>
135+
</distributionManagement>
136+
137+
<profiles>
138+
<profile>
139+
<id>release-sign-artifacts</id>
140+
<activation>
141+
<property>
142+
<name>performRelease</name>
143+
<value>true</value>
144+
</property>
145+
</activation>
146+
<build>
147+
<plugins>
148+
<plugin>
149+
<groupId>org.apache.maven.plugins</groupId>
150+
<artifactId>maven-gpg-plugin</artifactId>
151+
<version>1.4</version>
152+
<configuration>
153+
<passphrase>${gpg.passphrase}</passphrase>
154+
</configuration>
155+
<executions>
156+
<execution>
157+
<id>sign-artifacts</id>
158+
<phase>verify</phase>
159+
<goals>
160+
<goal>sign</goal>
161+
</goals>
162+
</execution>
163+
</executions>
164+
</plugin>
165+
</plugins>
166+
</build>
167+
</profile>
168+
</profiles>
169+
170+
</project>

src/META-INF/MANIFEST.MF

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/com/darkprograms/speech/microphone/Microphone.java renamed to src/main/java/com/darkprograms/speech/microphone/Microphone.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ private void initTargetDataLine(){
117117
*
118118
* @param audioFile The File to save the audio to
119119
* @throws LineUnavailableException
120-
* @throws Exception Throws an exception if something went wrong
121120
*/
122121
public void captureAudioToFile(File audioFile) throws LineUnavailableException {
123122
setState(CaptureState.STARTING_CAPTURE);
@@ -138,7 +137,6 @@ public void captureAudioToFile(File audioFile) throws LineUnavailableException {
138137
*
139138
* @param audioFile The fully path (String) to a file you want to save the audio in
140139
* @throws LineUnavailableException
141-
* @throws Exception Throws an exception if something went wrong
142140
*/
143141
public void captureAudioToFile(String audioFile) throws LineUnavailableException {
144142
File file = new File(audioFile);

src/com/darkprograms/speech/microphone/MicrophoneAnalyzer.java renamed to src/main/java/com/darkprograms/speech/microphone/MicrophoneAnalyzer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Microphone Analyzer class, detects pitch and volume while extending the microphone class.
88
* Implemented as a precursor to a Voice Activity Detection (VAD) algorithm.
99
* Currently can be used for audio data analysis.
10-
* Dependencies: FFT.java & Complex.java. Both found in the utility package.
10+
* Dependencies: FFT.java and Complex.java. Both found in the utility package.
1111
* @author Aaron Gokaslan
1212
********************************************************************************************/
1313

src/com/darkprograms/speech/recognizer/FlacEncoder.java renamed to src/main/java/com/darkprograms/speech/recognizer/FlacEncoder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.darkprograms.speech.recognizer;
22

3-
import javaFlacEncoder.FLACEncoder;
4-
import javaFlacEncoder.FLACFileOutputStream;
5-
import javaFlacEncoder.StreamConfiguration;
3+
import net.sourceforge.javaflacencoder.FLACEncoder;
4+
import net.sourceforge.javaflacencoder.FLACFileOutputStream;
5+
import net.sourceforge.javaflacencoder.StreamConfiguration;
66

77
import javax.sound.sampled.AudioFormat;
88
import javax.sound.sampled.AudioInputStream;

0 commit comments

Comments
 (0)