-
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.
- Loading branch information
1 parent
39ac42d
commit 715e92a
Showing
3 changed files
with
19 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
build | ||
build.xml | ||
build | ||
jar | ||
target | ||
TEST-*Test.xml |
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 +1,3 @@ | ||
The LUWRAIN Project, please visit https://luwrain.org/doc/authors/ to get a complete list of our developers | ||
The LUWRAIN Project is started and maintained by Michael Pozhidaev <[email protected]>. | ||
We kindly regard and welcome any help of other people. | ||
For further information please see https://luwrain.org/doc/authors |
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,5 +1,5 @@ | ||
/* | ||
Copyright 2012-2020 Michael Pozhidaev <[email protected]> | ||
Copyright 2012-2023 Michael Pozhidaev <[email protected]> | ||
Copyright 2015-2016 Roman Volovodov <[email protected]> | ||
This file is part of LUWRAIN. | ||
|
@@ -34,22 +34,26 @@ | |
|
||
final class Channel implements org.luwrain.speech.Channel | ||
{ | ||
static private final String LOG_COMPONENT = Extension.LOG_COMPONENT; | ||
static private final double UPPER_CASE_PITCH_MODIFIER = 3.0; | ||
static private final double RATE_MIN = 0.5; | ||
static private final double RATE_MAX = 2.0; | ||
static private final String | ||
LOG_COMPONENT = Extension.LOG_COMPONENT; | ||
|
||
static private final double | ||
UPPER_CASE_PITCH_MODIFIER = 3.0, | ||
RATE_MIN = 0.5, | ||
RATE_MAX = 2.0; | ||
|
||
private final TTSEngine tts; | ||
private final String voiceName; | ||
private SpeakingThread thread = null; | ||
|
||
Channel(Map<String, String> params) throws Exception | ||
{ | ||
NullCheck.notNull(params, "params"); | ||
final Path dataPath = Paths.get("rhvoice", "data"); | ||
final Path configPath = Paths.get("rhvoice", "config"); | ||
final Path enPath = Paths.get("data", "languages", "English"); | ||
final Path ruPath = Paths.get("data", "languages", "Russian"); | ||
final Path | ||
dataPath = Paths.get("rhvoice", "data"), | ||
configPath = Paths.get("rhvoice", "config"), | ||
enPath = Paths.get("data", "languages", "English"), | ||
ruPath = Paths.get("data", "languages", "Russian"); | ||
Log.info(LOG_COMPONENT, "Data directory: " + dataPath.toString()); | ||
//TTSEngine.init(); | ||
this.tts = new TTSEngine(dataPath.toString(), configPath.toString(), new String[]{ | ||
enPath.toString(), | ||
|
@@ -59,6 +63,7 @@ final class Channel implements org.luwrain.speech.Channel | |
if (params.containsKey("voice") && !params.get("voice").isEmpty()) | ||
this.voiceName = params.get("voice"); else | ||
this.voiceName = suggestVoice(); | ||
Log.info(LOG_COMPONENT, "Voice name: " + voiceName); | ||
if (voiceName == null || voiceName.trim().isEmpty()) | ||
throw new Exception("Unable to get suitable voice name"); | ||
} | ||
|