This repository has been archived by the owner on May 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 782
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Created audio API in smarthome.core - Introduced smarthome.core.voice for TTS, STT and HLI APIs - Introduced smarthome.io.javasound for audio implementations based on Java Sound API - Introduced smarthome.voice.mactts as a Mac specific TTS implementation Also-By: Harald Kuhn <harald.kuhn@gmail.com> Also-By: Kelly Davis <kdavis@mozilla.com> Also-By: Tilman Kamp <tilmankamp@posteo.de> Signed-off-by: Kai Kreuzer <kai@openhab.org>
- Loading branch information
1 parent
3a7999e
commit 8945a4d
Showing
117 changed files
with
5,940 additions
and
123 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
bundles/core/org.eclipse.smarthome.core.voice.test/.classpath
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,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="src" path="src/test/java"/> | ||
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.smarthome.core.voice"/> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
33 changes: 33 additions & 0 deletions
33
bundles/core/org.eclipse.smarthome.core.voice.test/.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>org.eclipse.smarthome.core.voice.test</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ManifestBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.SchemaBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ds.core.builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.pde.PluginNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions
12
bundles/core/org.eclipse.smarthome.core.voice.test/META-INF/MANIFEST.MF
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,12 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Eclipse SmartHome Core Voice Tests | ||
Bundle-SymbolicName: org.eclipse.smarthome.core.voice.test | ||
Bundle-Version: 0.9.0.qualifier | ||
Bundle-Vendor: Eclipse.org/SmartHome | ||
Fragment-Host: org.eclipse.smarthome.core.voice | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7 | ||
Import-Package: org.eclipse.smarthome.core.voice, | ||
org.hamcrest.core, | ||
org.junit;version="4.0.0" | ||
Bundle-ClassPath: . |
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
bundles/core/org.eclipse.smarthome.core.voice.test/build.properties
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,5 @@ | ||
source.. = src/test/java/ | ||
output.. = target/test-classes/ | ||
bin.includes = META-INF/,\ | ||
.,\ | ||
about.html |
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
55 changes: 55 additions & 0 deletions
55
...home.core.voice.test/src/test/java/org/eclipse/smarthome/core/voice/STTExceptionTest.java
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,55 @@ | ||
/** | ||
* Copyright (c) 2014-2016 by the respective copyright holders. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.eclipse.smarthome.core.voice; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
/** | ||
* Test general purpose STT exception | ||
* | ||
* @author Kelly Davis - Initial contribution and API | ||
*/ | ||
public class STTExceptionTest { | ||
|
||
/** | ||
* Test STTException() constructor | ||
*/ | ||
@Test | ||
public void testConstructor0() { | ||
STTException ttsException = new STTException(); | ||
Assert.assertNotNull("STTException() constructor failed", ttsException); | ||
} | ||
|
||
/** | ||
* Test STTException(String message, Throwable cause) constructor | ||
*/ | ||
@Test | ||
public void testConstructor1() { | ||
STTException ttsException = new STTException("Message", new Throwable()); | ||
Assert.assertNotNull("STTException(String, Throwable) constructor failed", ttsException); | ||
} | ||
|
||
/** | ||
* Test STTException(String message) constructor | ||
*/ | ||
@Test | ||
public void testConstructor2() { | ||
STTException ttsException = new STTException("Message"); | ||
Assert.assertNotNull("STTException(String) constructor failed", ttsException); | ||
} | ||
|
||
/** | ||
* Test STTException(Throwable cause) constructor | ||
*/ | ||
@Test | ||
public void testConstructor3() { | ||
STTException ttsException = new STTException(new Throwable()); | ||
Assert.assertNotNull("STTException(Throwable) constructor failed", ttsException); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
....test/src/test/java/org/eclipse/smarthome/core/voice/SpeechRecognitionErrorEventTest.java
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,37 @@ | ||
/** | ||
* Copyright (c) 2014-2016 by the respective copyright holders. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.eclipse.smarthome.core.voice; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
/** | ||
* Test SpeechRecognitionErrorEvent event | ||
* | ||
* @author Kelly Davis - Initial contribution and API | ||
*/ | ||
public class SpeechRecognitionErrorEventTest { | ||
|
||
/** | ||
* Test SpeechRecognitionErrorEvent(String) constructor | ||
*/ | ||
@Test | ||
public void testConstructor() { | ||
SpeechRecognitionErrorEvent sRE = new SpeechRecognitionErrorEvent("Message"); | ||
Assert.assertNotNull("SpeechRecognitionErrorEvent(String) constructor failed", sRE); | ||
} | ||
|
||
/** | ||
* Test SpeechRecognitionErrorEvent.getMessage() method | ||
*/ | ||
@Test | ||
public void getMessageTest() { | ||
SpeechRecognitionErrorEvent sRE = new SpeechRecognitionErrorEvent("Message"); | ||
Assert.assertEquals("SpeechRecognitionErrorEvent.getMessage() method failed", "Message", sRE.getMessage()); | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...voice.test/src/test/java/org/eclipse/smarthome/core/voice/SpeechRecognitionEventTest.java
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,47 @@ | ||
/** | ||
* Copyright (c) 2014-2016 by the respective copyright holders. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.eclipse.smarthome.core.voice; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
/** | ||
* Test SpeechRecognitionEvent event | ||
* | ||
* @author Kelly Davis - Initial contribution and API | ||
*/ | ||
public class SpeechRecognitionEventTest { | ||
|
||
/** | ||
* Test SpeechRecognitionEvent(String, float) constructor | ||
*/ | ||
@Test | ||
public void testConstructor() { | ||
SpeechRecognitionEvent sRE = new SpeechRecognitionEvent("Message", 0.5f); | ||
Assert.assertNotNull("SpeechRecognitionEvent(String, float) constructor failed", sRE); | ||
} | ||
|
||
/** | ||
* Test SpeechRecognitionEvent.getTranscript() method | ||
*/ | ||
@Test | ||
public void getTranscriptTest() { | ||
SpeechRecognitionEvent sRE = new SpeechRecognitionEvent("Message", 0.5f); | ||
Assert.assertEquals("SpeechRecognitionEvent.getTranscript() method failed", "Message", sRE.getTranscript()); | ||
} | ||
|
||
/** | ||
* Test SpeechRecognitionEvent.getConfidence() method | ||
*/ | ||
@Test | ||
public void getConfidenceTest() { | ||
SpeechRecognitionEvent sRE = new SpeechRecognitionEvent("Message", 0.5f); | ||
Assert.assertEquals("SpeechRecognitionEvent.getConfidence() method failed", (double) 0.5f, | ||
(double) sRE.getConfidence(), (double) 0.001f); | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
...home.core.voice.test/src/test/java/org/eclipse/smarthome/core/voice/TTSExceptionTest.java
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,55 @@ | ||
/** | ||
* Copyright (c) 2014-2016 by the respective copyright holders. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.eclipse.smarthome.core.voice; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
/** | ||
* Test general purpose TTS exception | ||
* | ||
* @author Kelly Davis - Initial contribution and API | ||
*/ | ||
public class TTSExceptionTest { | ||
|
||
/** | ||
* Test TTSException() constructor | ||
*/ | ||
@Test | ||
public void testConstructor0() { | ||
TTSException ttsException = new TTSException(); | ||
Assert.assertNotNull("TTSException() constructor failed", ttsException); | ||
} | ||
|
||
/** | ||
* Test TTSException(String message, Throwable cause) constructor | ||
*/ | ||
@Test | ||
public void testConstructor1() { | ||
TTSException ttsException = new TTSException("Message", new Throwable()); | ||
Assert.assertNotNull("TTSException(String, Throwable) constructor failed", ttsException); | ||
} | ||
|
||
/** | ||
* Test TTSException(String message) constructor | ||
*/ | ||
@Test | ||
public void testConstructor2() { | ||
TTSException ttsException = new TTSException("Message"); | ||
Assert.assertNotNull("TTSException(String) constructor failed", ttsException); | ||
} | ||
|
||
/** | ||
* Test TTSException(Throwable cause) constructor | ||
*/ | ||
@Test | ||
public void testConstructor3() { | ||
TTSException ttsException = new TTSException(new Throwable()); | ||
Assert.assertNotNull("TTSException(Throwable) constructor failed", ttsException); | ||
} | ||
} |
Binary file added
BIN
+87.1 KB
....core.voice.test/src/test/resources/org/eclipse/smarthome/io/voice/internal/goforward.raw
Binary file not shown.
Binary file added
BIN
+91.4 KB
...ore.voice.test/src/test/resources/org/eclipse/smarthome/io/voice/internal/hellowworld.raw
Binary file not shown.
Binary file added
BIN
+120 KB
...me.core.voice.test/src/test/resources/org/eclipse/smarthome/io/voice/internal/marieta.raw
Binary file not shown.
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
2 changes: 1 addition & 1 deletion
2
...o/org.eclipse.smarthome.io.voice/.project → ...org.eclipse.smarthome.core.voice/.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
7 changes: 7 additions & 0 deletions
7
bundles/core/org.eclipse.smarthome.core.voice/.settings/org.eclipse.jdt.core.prefs
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,7 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 | ||
org.eclipse.jdt.core.compiler.compliance=1.7 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=1.7 |
4 changes: 4 additions & 0 deletions
4
bundles/core/org.eclipse.smarthome.core.voice/.settings/org.eclipse.pde.core.prefs
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 @@ | ||
#Mon Oct 11 21:08:09 CEST 2010 | ||
eclipse.preferences.version=1 | ||
pluginProject.extensions=false | ||
resolve.requirebundle=false |
15 changes: 8 additions & 7 deletions
15
...e.smarthome.io.voice/META-INF/MANIFEST.MF → ...smarthome.core.voice/META-INF/MANIFEST.MF
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,26 +1,27 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Eclipse SmartHome Voice I/O Bundle | ||
Bundle-SymbolicName: org.eclipse.smarthome.io.voice | ||
Bundle-Name: Eclipse SmartHome Core Voice | ||
Bundle-SymbolicName: org.eclipse.smarthome.core.voice | ||
Bundle-Version: 0.9.0.qualifier | ||
Bundle-Vendor: Eclipse.org/SmartHome | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7 | ||
Bundle-ClassPath: . | ||
Import-Package: org.apache.commons.collections, | ||
Import-Package: org.apache.commons.collections.map, | ||
org.apache.commons.io, | ||
org.apache.commons.lang, | ||
org.eclipse.smarthome.core.audio, | ||
org.eclipse.smarthome.core.common.registry, | ||
org.eclipse.smarthome.core.events, | ||
org.eclipse.smarthome.core.i18n, | ||
org.eclipse.smarthome.core.items, | ||
org.eclipse.smarthome.core.items.events, | ||
org.eclipse.smarthome.core.library.types, | ||
org.eclipse.smarthome.core.types, | ||
org.eclipse.smarthome.io.console, | ||
org.eclipse.smarthome.io.console.extensions, | ||
org.eclipse.smarthome.io.voice.tts, | ||
org.osgi.framework, | ||
org.slf4j | ||
Export-Package: org.eclipse.smarthome.io.voice.text, | ||
org.eclipse.smarthome.io.voice.tts | ||
Export-Package: org.eclipse.smarthome.core.voice, | ||
org.eclipse.smarthome.core.voice.text | ||
Service-Component: OSGI-INF/*.xml | ||
Bundle-Activator: org.eclipse.smarthome.io.voice.internal.VoiceActivator | ||
Bundle-ActivationPolicy: lazy |
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
Oops, something went wrong.