-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolves #118: text to speech #119
Open
Baret
wants to merge
18
commits into
master
Choose a base branch
from
issue-118-text-to-speech
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
0a75e09
playing around with maryTTS
Baret d757695
use male voice
Baret e85ad49
Use faster voice for speaker, created example main
Baret 3903c57
Added ignored phrases, initializing effects correctly
Baret bf9a086
Made sound optional
Baret 0d52448
Added exclusions to continue using voice 5.2
Baret 1dc3d5d
Ignore log and speech folders
Baret 651d0c7
fix for enforcer rules regarding commons-io
Baret d0fb397
Moved Speaker to new module sound
Baret 0724d0a
Added proper startup and shutdown for Speaker
Baret 1fce8cc
Built model classes for effects
Baret 0e28db7
Added unit test and documentation
Baret ba94754
Fixed package name
Baret e41a3ac
Use upper case for options constant
Baret 5cdd54f
extracted function
Loomie 05ebea4
Merge remote-tracking branch 'origin/master' into issue-118-text-to-s…
Baret 684168c
Merge branch 'master' into issue-118-text-to-speech
Baret 5275638
re-added jcenter repo
Baret File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
target/ | ||
logs/ | ||
|
||
log/ | ||
logs/ | ||
*.wav | ||
|
||
# IntelliJ | ||
.DS_Store | ||
.idea | ||
|
59 changes: 59 additions & 0 deletions
59
...tion/src/main/kotlin/de/gleex/pltcmd/game/application/examples/speaker/SpeakerExamples.kt
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,59 @@ | ||
package de.gleex.pltcmd.game.application.examples.speaker | ||
|
||
import de.gleex.pltcmd.game.sound.speech.Speaker | ||
import kotlinx.coroutines.ExperimentalCoroutinesApi | ||
import kotlinx.coroutines.delay | ||
import kotlinx.coroutines.runBlocking | ||
import org.hexworks.cobalt.logging.api.LoggerFactory | ||
|
||
private val log = LoggerFactory.getLogger("SpeakerExample") | ||
|
||
private val texts = listOf( | ||
"Hello World!", | ||
"Bravo, engage enemy at (1 1 5| 2 2 4), out." | ||
) | ||
|
||
@ExperimentalCoroutinesApi | ||
fun main() { | ||
|
||
/* | ||
Documentation about maryTTS can be found here: http://marytts.phonetik.uni-muenchen.de:59125/documentation.html | ||
|
||
Available effects: http://marytts.phonetik.uni-muenchen.de:59125/audioeffects | ||
The list is: | ||
Volume amount:2.0; | ||
TractScaler amount:1.5; | ||
F0Scale f0Scale:2.0; | ||
F0Add f0Add:50.0; | ||
Rate durScale:1.5; | ||
Robot amount:100.0; | ||
Whisper amount:100.0; | ||
Stadium amount:100.0 | ||
Chorus delay1:466;amp1:0.54;delay2:600;amp2:-0.10;delay3:250;amp3:0.30 | ||
FIRFilter type:3;fc1:500.0;fc2:2000.0 | ||
JetPilot | ||
|
||
Description for a specific effect (change effect name in the URL): | ||
http://marytts.phonetik.uni-muenchen.de:59125/audioeffect-help?effect=TractScaler | ||
*/ | ||
|
||
log.info("Starting Speaker...") | ||
Speaker.startup() | ||
|
||
for (text in texts) { | ||
log.info("Saying '$text'...") | ||
runBlocking { | ||
Speaker.say(text) | ||
delay(100) | ||
Speaker.waitForQueueToEmpty() | ||
} | ||
log.info("") | ||
log.info(" - - -") | ||
log.info("") | ||
} | ||
|
||
runBlocking { | ||
delay(500) | ||
Speaker.waitForQueueToEmpty() | ||
} | ||
} |
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
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
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,53 @@ | ||
<?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/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>game</artifactId> | ||
<groupId>de.gleex.pltcmd.game</groupId> | ||
<version>0.2.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>sound</artifactId> | ||
<name>Sound</name> | ||
<description>Everything related to sound output.</description> | ||
|
||
<properties> | ||
<marytts.version>5.2</marytts.version> | ||
<marytts.version.beta>${marytts.version}-beta3</marytts.version.beta> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>de.gleex.pltcmd.game</groupId> | ||
<artifactId>options</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>de.dfki.mary</groupId> | ||
<artifactId>voice-cmu-rms-hsmm</artifactId> | ||
<version>${marytts.version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>de.dfki.mary</groupId> | ||
<artifactId>marytts-runtime</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>de.dfki.mary</groupId> | ||
<artifactId>marytts-common</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>de.dfki.mary</groupId> | ||
<artifactId>marytts-signalproc</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<!-- We need the beta version of the runtime as the Rate-Effect does not work in 5.2 --> | ||
<dependency> | ||
<groupId>de.dfki.mary</groupId> | ||
<artifactId>marytts-runtime</artifactId> | ||
<version>${marytts.version.beta}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this takes some time consider calling this asynchronous!