mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
98_Text2Speech.pm: some Improvements by Mirko
git-svn-id: https://svn.fhem.de/fhem/trunk@24138 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
687e42c137
commit
b48c93bf4f
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- bugfix: 98_Text2Speech.pm: some Improvements by Mirko
|
||||||
- change: 73_GardenaSmartBridge: Change part of code for new API
|
- change: 73_GardenaSmartBridge: Change part of code for new API
|
||||||
- bugfix: 47_OBIS: fixed bug with 64 bit integer numbers
|
- bugfix: 47_OBIS: fixed bug with 64 bit integer numbers
|
||||||
- change: 46_TeslaPowerwall2AC: Code rewrite for new Auth API and
|
- change: 46_TeslaPowerwall2AC: Code rewrite for new Auth API and
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
# ALL ALL = NOPASSWD: /usr/bin/mplayer
|
# ALL ALL = NOPASSWD: /usr/bin/mplayer
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
# VoiceRSS: http://www.voicerss.org/api/documentation.aspx
|
|
||||||
|
|
||||||
package main;
|
package main;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
@ -240,37 +238,37 @@ sub Text2Speech_loadmodules($$) {
|
|||||||
require IO::File;
|
require IO::File;
|
||||||
IO::File->import;
|
IO::File->import;
|
||||||
1;
|
1;
|
||||||
} or return "IO::File Module not installed, please install";
|
} or return "IO::File Module not installed. Please install.";
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
require Digest::MD5;
|
require Digest::MD5;
|
||||||
Digest::MD5->import;
|
Digest::MD5->import;
|
||||||
1;
|
1;
|
||||||
} or return "Digest::MD5 Module not installed, please install";
|
} or return "Digest::MD5 Module not installed. Please install.";
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
require URI::Escape;
|
require URI::Escape;
|
||||||
URI::Escape->import;
|
URI::Escape->import;
|
||||||
1;
|
1;
|
||||||
} or return "URI::Escape Module not installed, please install";
|
} or return "URI::Escape Module not installed. Please install.";
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
require Text::Iconv;
|
require Text::Iconv;
|
||||||
Text::Iconv->import;
|
Text::Iconv->import;
|
||||||
1;
|
1;
|
||||||
} or return "Text::Iconv Module not installed, please install";
|
} or return "Text::Iconv Module not installed. Please install.";
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
require Encode::Guess;
|
require Encode::Guess;
|
||||||
Encode::Guess->import;
|
Encode::Guess->import;
|
||||||
1;
|
1;
|
||||||
} or return "Encode::Guess Module not installed, please install";
|
} or return "Encode::Guess Module not installed. Please install.";
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
require MP3::Info;
|
require MP3::Info;
|
||||||
MP3::Info->import;
|
MP3::Info->import;
|
||||||
1;
|
1;
|
||||||
} or return "MP3::Info Module not installed, please install";
|
} or return "MP3::Info Module not installed. Please install.";
|
||||||
|
|
||||||
if ($TTS_Ressource eq "Amazon-Polly") {
|
if ($TTS_Ressource eq "Amazon-Polly") {
|
||||||
# Module werden nur benötigt mit der Polly Engine
|
# Module werden nur benötigt mit der Polly Engine
|
||||||
@ -278,7 +276,7 @@ sub Text2Speech_loadmodules($$) {
|
|||||||
require Paws::Polly;
|
require Paws::Polly;
|
||||||
Paws::Polly->import;
|
Paws::Polly->import;
|
||||||
1;
|
1;
|
||||||
} or return "Paws Module not installed. Please install, goto https://metacpan.org/source/JLMARTIN/Paws-0.39";
|
} or return "Paws Module not installed. Please install.";
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
require File::HomeDir;
|
require File::HomeDir;
|
||||||
@ -522,6 +520,8 @@ sub Text2Speech_Set($@)
|
|||||||
|
|
||||||
if($cmd ne "tts") {
|
if($cmd ne "tts") {
|
||||||
return "$cmd needs $sets{$cmd} parameter(s)" if(@a-$sets{$cmd} != 0);
|
return "$cmd needs $sets{$cmd} parameter(s)" if(@a-$sets{$cmd} != 0);
|
||||||
|
} else {
|
||||||
|
return "$cmd needs text parameter" if(@a-$sets{$cmd} < 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Abbruch falls Disabled
|
# Abbruch falls Disabled
|
||||||
@ -585,6 +585,18 @@ sub Text2Speech_PrepareSpeech($$) {
|
|||||||
my $TTS_ForceSplit = 0;
|
my $TTS_ForceSplit = 0;
|
||||||
my $TTS_AddDelimiter;
|
my $TTS_AddDelimiter;
|
||||||
|
|
||||||
|
# Cleanup string
|
||||||
|
$hash->{helper}{TTS_PlayerOptions} = "";
|
||||||
|
while ($t =~ s/^ //isg) {};
|
||||||
|
$t =~ s/^'(.*)'$/$1/;
|
||||||
|
$t =~ s/^"(.*)"$/$1/;
|
||||||
|
|
||||||
|
# Check text for command string
|
||||||
|
if ($t =~ /^\[(.*?)\](.*?)$/) {
|
||||||
|
($hash->{helper}{TTS_PlayerOptions}, $t) = ($1, $2);
|
||||||
|
while ($t =~ s/^ //isg) {};
|
||||||
|
}
|
||||||
|
|
||||||
if($TTS_Delimiter && $TTS_Delimiter =~ m/^[+-]a[lfn]/i) {
|
if($TTS_Delimiter && $TTS_Delimiter =~ m/^[+-]a[lfn]/i) {
|
||||||
$TTS_ForceSplit = 1 if(substr($TTS_Delimiter,0,1) eq "+");
|
$TTS_ForceSplit = 1 if(substr($TTS_Delimiter,0,1) eq "+");
|
||||||
$TTS_ForceSplit = 0 if(substr($TTS_Delimiter,0,1) eq "-");
|
$TTS_ForceSplit = 0 if(substr($TTS_Delimiter,0,1) eq "-");
|
||||||
@ -771,13 +783,13 @@ sub Text2Speech_BuildMplayerCmdString($$) {
|
|||||||
|
|
||||||
my $NoDebug = $mplayerNoDebug;
|
my $NoDebug = $mplayerNoDebug;
|
||||||
$NoDebug = "" if($verbose >= 5);
|
$NoDebug = "" if($verbose >= 5);
|
||||||
|
|
||||||
# anstatt mplayer wird ein anderer Player verwendet
|
# anstatt mplayer wird ein anderer Player verwendet
|
||||||
if ($TTS_MplayerCall !~ m/mplayer/) {
|
if ($TTS_MplayerCall !~ m/mplayer/) {
|
||||||
$TTS_MplayerCall =~ s/{device}/$AlsaDevice/g;
|
$TTS_MplayerCall =~ s/{device}/$AlsaDevice/g;
|
||||||
$TTS_MplayerCall =~ s/{volume}/$hash->{VOLUME}/g;
|
$TTS_MplayerCall =~ s/{volume}/$hash->{VOLUME}/g;
|
||||||
$TTS_MplayerCall =~ s/{volumeadjust}/$TTS_VolumeAdjust/g;
|
$TTS_MplayerCall =~ s/{volumeadjust}/$TTS_VolumeAdjust/g;
|
||||||
$TTS_MplayerCall =~ s/{file}/$file/g;
|
$TTS_MplayerCall =~ s/{file}/$file/g;
|
||||||
|
$TTS_MplayerCall =~ s/{options}/$hash->{helper}{TTS_PlayerOptions}/g;
|
||||||
|
|
||||||
$cmd = $TTS_MplayerCall;
|
$cmd = $TTS_MplayerCall;
|
||||||
} else {
|
} else {
|
||||||
@ -993,7 +1005,7 @@ sub Text2Speech_DoIt($) {
|
|||||||
$file = $TTS_CacheFileDir."/".$filename;
|
$file = $TTS_CacheFileDir."/".$filename;
|
||||||
Log3 $hash->{NAME}, 4, $hash->{NAME}.": $filename als direkte MP3 Datei erkannt!";
|
Log3 $hash->{NAME}, 4, $hash->{NAME}.": $filename als direkte MP3 Datei erkannt!";
|
||||||
} else {
|
} else {
|
||||||
$filename = md5_hex($language{$TTS_Ressource}{$TTS_Language} ."|". $t) . ".mp3";
|
$filename = md5_hex($TTS_Ressource ."|". $t) . ".mp3";
|
||||||
$file = $TTS_CacheFileDir."/".$filename;
|
$file = $TTS_CacheFileDir."/".$filename;
|
||||||
Log3 $hash->{NAME}, 4, $hash->{NAME}.": Textbaustein ist keine direkte MP3 Datei, ermittle MD5 CacheNamen: $filename";
|
Log3 $hash->{NAME}, 4, $hash->{NAME}.": Textbaustein ist keine direkte MP3 Datei, ermittle MD5 CacheNamen: $filename";
|
||||||
}
|
}
|
||||||
@ -1211,8 +1223,11 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
|
|
||||||
=pod
|
=pod
|
||||||
=item helper
|
=item helper
|
||||||
=item summary speaks given text via loudspeaker
|
=item summary A module that converts text to speech and also plays \
|
||||||
=item summary_DE wandelt Text in Sprache um zur Ausgabe auf Lautsprecher
|
the result on a local or remote loudspeaker
|
||||||
|
|
||||||
|
=item summary_DE Modul, das Text in Sprache umwandelt und das Ergebnis \
|
||||||
|
über einen lokalen oder entfernten Lautsprecher wiedergibt
|
||||||
=begin html
|
=begin html
|
||||||
|
|
||||||
<a name="Text2Speech"></a>
|
<a name="Text2Speech"></a>
|
||||||
@ -1224,22 +1239,25 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
<ul>
|
<ul>
|
||||||
<b>Local : </b><code>define <name> Text2Speech <alsadevice></code><br>
|
<b>Local : </b><code>define <name> Text2Speech <alsadevice></code><br>
|
||||||
<b>Remote: </b><code>define <name> Text2Speech <host>[:<portnr>][:SSL] [portpassword]</code>
|
<b>Remote: </b><code>define <name> Text2Speech <host>[:<portnr>][:SSL] [portpassword]</code>
|
||||||
|
<b>Server: </b><code>define <name> Text2Speech none</code><br>
|
||||||
<p>
|
<p>
|
||||||
This module converts any text into speech with serveral possible providers. The Device can be defined as locally
|
This module converts any text into speech with several possible providers. The Device can be defined as locally
|
||||||
or remote device.
|
or remote instance.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<b>Local Device</b><br>
|
<b>Local Device</b><br>
|
||||||
<ul>
|
<ul>
|
||||||
The output will be send to any connected audiodevice. For example external speakers connected per jack
|
The output will be sent to any connected audio device. For example speakers connected per jack,
|
||||||
or with bluetooth speakers - connected per bluetooth dongle. Its important to install mplayer.<br>
|
network, WiFI or Bluetooth. Playback can be done using MPlayer or any other application.<br>
|
||||||
|
<br>
|
||||||
|
Mplayer installation under Debian/Ubuntu/Raspbian:<br>
|
||||||
<code>apt-get install mplayer</code><br>
|
<code>apt-get install mplayer</code><br>
|
||||||
The given alsa device has to be configured in <code>/etc/asound.conf</code>
|
The given alsa device has to be configured in <code>/etc/asound.conf</code>
|
||||||
<p>
|
<p>
|
||||||
<b>Special AlsaDevice: </b><i>default</i><br>
|
<b>Special AlsaDevice: </b><i>default</i><br>
|
||||||
The internal mplayer command will be without any audio directive if the given alsadevice is <i>default</i>.
|
The internal Mplayer command will be without any audio directive if the given alsa device is <i>default</i>.
|
||||||
In this case mplayer is using the standard audiodevice.
|
In this case Mplayer is using the standard audio device.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<b>Example:</b><br>
|
<b>Example:</b><br>
|
||||||
@ -1252,7 +1270,7 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
<li>
|
<li>
|
||||||
<b>Remote Device</b><br>
|
<b>Remote Device</b><br>
|
||||||
<ul>
|
<ul>
|
||||||
This module can configured as remote-device for client-server Environments. The Client has to be configured
|
This module can be configured as remote-device for client-server environments. The Client has to be configured
|
||||||
as local device.<br>
|
as local device.<br>
|
||||||
Notice: the Name of the locally instance has to be the same!
|
Notice: the Name of the locally instance has to be the same!
|
||||||
<ul>
|
<ul>
|
||||||
@ -1273,9 +1291,13 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
<li>
|
<li>
|
||||||
<b>Server Device</b>
|
<b>Server Device</b>
|
||||||
<ul>
|
<ul>
|
||||||
In case of an usage of an Server, only the mp3 file will be generated.It makes no sence to use the attribute <i>TTS_speakAsFastAsPossible</i>.
|
In case of an usage as a server, only the mp3 file will be generated and displayed as lastFilename reading. It makes no sense to use the attribute <i>TTS_speakAsFastAsPossible</i> here.
|
||||||
Its recommend, to use the attribute <i>TTS_useMP3Wrap</i>. Otherwise only the last audiobrick will be shown is reading <i>lastFilename</i>.
|
Its recommend, to use the attribute <i>TTS_useMP3Wrap</i>. Otherwise only the last audiobrick will be shown in reading <i>lastFilename</i>.
|
||||||
</ul>
|
</ul>
|
||||||
|
<p>
|
||||||
|
<b>Example:</b><br>
|
||||||
|
<code>define MyTTS Text2Speech none</code>
|
||||||
|
</p>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
@ -1285,9 +1307,11 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
<b>Set</b>
|
<b>Set</b>
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>tts</b>:<br>
|
<li><b>tts</b>:<br>
|
||||||
Giving a text to translate into audio. You play set mp3-files directly. In this case you have to enclosure them with a single colon before and after the declaration.
|
Definition of text for voice output. To output mp3 files directly, they must be specified with
|
||||||
The files must save under the directory of given <i>TTS_FileTemplateDir</i>.
|
leading and closing colons. Therefore, the text itself must not contain any double punctuation.
|
||||||
Please note: The text doesn´t have any colons itself.
|
The mp3 files must be stored in the <i>TTS_FileTemplateDir</i> directory.
|
||||||
|
SSML can be used for the Amazon Polly language engine. See examples.
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><b>volume</b>:<br>
|
<li><b>volume</b>:<br>
|
||||||
Setting up the volume audio response.<br>
|
Setting up the volume audio response.<br>
|
||||||
@ -1303,33 +1327,32 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
<b>Attributes</b>
|
<b>Attributes</b>
|
||||||
<ul>
|
<ul>
|
||||||
<li>TTS_Delimiter<br>
|
<li>TTS_Delimiter<br>
|
||||||
optional: By using the google engine, its not possible to convert more than 100 characters in a single audio brick.
|
Optional: By using the Google engine, its not possible to convert more than 100 characters in a single audio brick.
|
||||||
With a Delimiter the audio brick will be split at this character. A Delimiter must be a single character.!<br>
|
With a delimiter the audio brick will be split at this character. A delimiter must be a single character!<br>
|
||||||
By default, ech audio brick will be split at sentence end. Is a single sentence longer than 100 characters,
|
By default, each audio brick will be split at sentence end. Is a single sentence longer than 100 characters,
|
||||||
the sentence will be split additionally at comma, semicolon and the word <i>and</i>.<br>
|
the sentence will be split additionally at comma, semicolon and the word <i>and</i>.<br>
|
||||||
Notice: Only available in locally instances with Google engine!
|
Notice: Only available in locally instances with Google engine!
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_Ressource<br>
|
<li>TTS_Ressource<br>
|
||||||
optional: Selection of the Translator Engine<br>
|
Optional: Selection of the Translator Engine<br>
|
||||||
Notice: Only available in locally instances!
|
Notice: Only available in locally instances!
|
||||||
<ul>
|
<ul>
|
||||||
<li>Google<br>
|
<li>Google<br>
|
||||||
Using the Google Engine. It´s nessessary to have internet access. This engine is the recommend engine
|
Google Engine. Prerequisite: Active Internet connection<br>
|
||||||
because the quality is fantastic. This engine is using by default.
|
This engine is recommended for its quality and is used by default.
|
||||||
</li>
|
</li>
|
||||||
<li>VoiceRSS<br>
|
<li>VoiceRSS<br>
|
||||||
Using the VoiceRSS Engine. Its a free engine till 350 requests per day. If you need more, you have to pay.
|
VoiceRSS Engine. Prerequisite: Active Internet connection<br>
|
||||||
It´s nessessary to have internet access. This engine is the 2nd recommend engine
|
Free of charge up to 350 requests per day. If you need more, you have to pay.
|
||||||
because the quality is also fantastic. To use this engine you need an APIKey (see TTS_APIKey)
|
This engine is also recommended due to its quality. To use this engine, you need an APIKey (see TTS_APIKey)
|
||||||
</li>
|
</li>
|
||||||
<li>ESpeak<br>
|
<li>ESpeak<br>
|
||||||
Using the ESpeak Engine. Installation Espeak and lame is required.<br>
|
eSpeak Engine. Prerequisite: Installation of Espeak and lame<br>
|
||||||
<code>apt-get install espeak lame</code>
|
eSpeak is an open source software speech synthesizer for English and other languages.
|
||||||
</li>
|
</li>
|
||||||
<li>SVOX-pico<br>
|
<li>SVOX-pico<br>
|
||||||
Using the SVOX-Pico TTS-Engine (from the AOSP).<br>
|
SVOX-Pico TTS-Engine (from the AOSP). Prerequisite: Installation of SVOX-Pico and lame<br>
|
||||||
Installation of the engine and <code>lame</code> is required:<br>
|
|
||||||
<code>sudo apt-get install libttspico-utils lame</code><br><br>
|
<code>sudo apt-get install libttspico-utils lame</code><br><br>
|
||||||
On ARM/Raspbian the package <code>libttspico-utils</code>,<br>
|
On ARM/Raspbian the package <code>libttspico-utils</code>,<br>
|
||||||
so you may have to compile it yourself or use the precompiled package from <a target="_blank" href"http://www.robotnet.de/2014/03/20/sprich-freund-und-tritt-ein-sprachausgabe-fur-den-rasberry-pi/">this guide</a>, in short:<br>
|
so you may have to compile it yourself or use the precompiled package from <a target="_blank" href"http://www.robotnet.de/2014/03/20/sprich-freund-und-tritt-ein-sprachausgabe-fur-den-rasberry-pi/">this guide</a>, in short:<br>
|
||||||
@ -1339,8 +1362,8 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
<code>sudo dpkg --install pico2wave.deb</code>
|
<code>sudo dpkg --install pico2wave.deb</code>
|
||||||
</li>
|
</li>
|
||||||
<li>Amazon-Polly<br>
|
<li>Amazon-Polly<br>
|
||||||
Using the Amazon Polly engine, the same as Amazon Alexa.<br>
|
Amazon Polly Engine. Prerequisite: Active Internet connection, Perl package Paws<br>
|
||||||
The perl package Paws is required. An AWS Access and Polly Aws User is required too<br>
|
Amazon service that turns text into lifelike speech. An AWS Access and Polly Aws User is required.<br>
|
||||||
<code>cpan paws</code><br>
|
<code>cpan paws</code><br>
|
||||||
The credentials to your AWS Polly are expected at ~/.aws/credentials<br>
|
The credentials to your AWS Polly are expected at ~/.aws/credentials<br>
|
||||||
<code>[default]
|
<code>[default]
|
||||||
@ -1356,52 +1379,67 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_Language_Custom<br>
|
<li>TTS_Language_Custom<br>
|
||||||
if you want another engine and speech of default languages, you can insert this here.<br>
|
If you want another engine and speech of default languages, you can insert this here.<br>
|
||||||
The definition is dependent of used engine. This attribute overrides an TTS_Language attribute.<br>
|
The definition depends on the used engine. This attribute overrides an TTS_Language attribute.<br>
|
||||||
Please refer the specific API reference.
|
Please refer to the specific API reference.
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_APIKey<br>
|
<li>TTS_APIKey<br>
|
||||||
An APIKey its needed if you want to use VoiceRSS. You have to register at the following page:<br>
|
An APIKey is needed if you want to use VoiceRSS. You have to register at the following page:<br>
|
||||||
http://www.voicerss.org/registration.aspx <br>
|
http://www.voicerss.org/registration.aspx
|
||||||
After this, you will get your personal APIKey.
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_User<br>
|
<li>TTS_User<br>
|
||||||
Actual without any usage. Needed in case if a TTS Engine need an username and an apikey for each request.
|
Actual without any usage. Needed in case if a TTS Engine needs a username and an APIKey for a request.
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_CacheFileDir<br>
|
<li>TTS_CacheFileDir<br>
|
||||||
optional: The downloaded Goole audio bricks are saved in this folder for reusing.
|
Optional: The downloaded Google audio bricks are saved in this folder.
|
||||||
No automatically implemented deleting are available.<br>
|
No automatic delete/cleanup available.<br>
|
||||||
Default: <i>cache/</i><br>
|
Default: <i>cache/</i><br>
|
||||||
Notice: Only available in locally instances!
|
Notice: Available on local instances only!
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_UseMP3Wrap<br>
|
<li>TTS_UseMP3Wrap<br>
|
||||||
optional: To become a liquid audio response its recommend to use the tool mp3wrap.
|
For best voice output, it is recommended that the individual downloads are combined into a single file.
|
||||||
Each downloaded audio bricks are concatinated to a single audio file to play with mplayer.<br>
|
Each downloaded audio bricks are concatinated to a single audio file to play with Mplayer.<br>
|
||||||
Installtion of the mp3wrap source is required.<br>
|
Installtion of the mp3wrap package is required.<br>
|
||||||
<code>apt-get install mp3wrap</code><br>
|
<code>apt-get install mp3wrap</code><br>
|
||||||
Notice: Only available in locally instances!
|
Notice: Available on local instances only!
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_MplayerCall<br>
|
<li>TTS_MplayerCall<br>
|
||||||
optional: Setting up the Mplayer system call. The following example is default.<br>
|
Optional: Definition of the system call to Mplayer or a different tool.<br>
|
||||||
Example: <code>sudo /usr/bin/mplayer</code>
|
If a tool other than Mplayer is used, the following templates apply:<br>
|
||||||
|
<ul>
|
||||||
|
<li>{device}</li>
|
||||||
|
<li>{volume}</li>
|
||||||
|
<li>{volumeadjust}</li>
|
||||||
|
<li>{file}</li>
|
||||||
|
<li>{options}</li>
|
||||||
|
</ul>
|
||||||
|
{options} are provided inside the text in parentheses during the set command.
|
||||||
|
Used for example to set special parameters for each call separately<br>
|
||||||
|
Example: <code>set myTTS tts [192.168.0.1:7000] This is my text</code><br><br>
|
||||||
|
|
||||||
|
Examples:<br>
|
||||||
|
<code>attr myTTS TTS_MplayerCall sudo /usr/bin/mplayer</code><br>
|
||||||
|
<code>attr myTTS TTS_MplayerCall AUDIODEV={device} play -q -v {volume} {file}</code><br>
|
||||||
|
<code>attr myTTS TTS_MplayerCall player {file} {options}</code><br>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_SentenceAppendix<br>
|
<li>TTS_SentenceAppendix<br>
|
||||||
Optional: Definition of one mp3-file to append each time of audio response.<br>
|
Optional: Definition of one mp3-file to append each time of audio response.<br>
|
||||||
Using of Mp3Wrap is required. The audio bricks has to be downloaded before into CacheFileDir.
|
Mp3Wrap is required. The audio chunks must be downloaded to the CacheFileDir beforehand.
|
||||||
Example: <code>silence.mp3</code>
|
Example: <code>silence.mp3</code>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_FileMapping<br>
|
<li>TTS_FileMapping<br>
|
||||||
Definition of mp3files with a custom template definition. Separated by space.
|
Definition of mp3files with a custom template definition. Separated by space.
|
||||||
All templatedefinitions can used in audiobricks by <i>tts</i>.
|
All template definitions can be used in audiobricks by <i>tts</i> command.
|
||||||
The definition must begin and end with e colon.
|
The definition must begin and end with a colon.
|
||||||
The mp3files must saved in the given directory by <i>TTS_FIleTemplateDir</i>.<br>
|
The mp3files must be saved in <i>TTS_FIleTemplateDir</i>.<br>
|
||||||
<code>attr myTTS TTS_FileMapping ring:ringtone.mp3 beep:MyBeep.mp3</code><br>
|
<code>attr myTTS TTS_FileMapping ring:ringtone.mp3 beep:MyBeep.mp3</code><br>
|
||||||
<code>set MyTTS tts Attention: This is my ringtone :ring: Its loud?</code>
|
<code>set MyTTS tts Attention: This is my ringtone :ring: Its loud?</code>
|
||||||
</li>
|
</li>
|
||||||
@ -1411,17 +1449,30 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
Optional, Default: <code>cache/templates</code>
|
Optional, Default: <code>cache/templates</code>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>TTS_VolumeAdjust<br>
|
||||||
|
Basic volume increase<br>
|
||||||
|
Default: 110<br>
|
||||||
|
<code>attr myTTS TTS_VolumeAdjust 400</code>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li>TTS_noStatisticsLog<br>
|
<li>TTS_noStatisticsLog<br>
|
||||||
If set to <b>1</b>, it prevents logging statistics to DbLog Devices, default is <b>0</b><br>
|
If set to <b>1</b>, it prevents logging statistics to DbLog Devices, default is <b>0</b><br>
|
||||||
But please notice: this looging is important to able to delete longer unused cachefiles. If you disable this
|
Note: This logging is important to be able to delete cache files that have not been used for a longer period of time.
|
||||||
please take care to cleanup your cachedirectory by yourself.
|
If you disable this, you will have to clean your cache directory manually.
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_speakAsFastAsPossible<br>
|
<li>TTS_speakAsFastAsPossible<br>
|
||||||
Trying to get an speach as fast as possible. In case of not present audiobricks, you can hear a short break.
|
Trying to get a speech as fast as possible. In case of not present audio bricks, you can
|
||||||
The audiobrick will be download at this time. In case of an presentation of all audiobricks at local cache,
|
hear a short break as the audio brick will be downloaded at this time.
|
||||||
this attribute has no impact.<br>
|
In case of a presentation of all audio bricks at local cache, this attribute has no impact.<br>
|
||||||
Attribute only valid in case of an local or server instance.
|
Attribute is only valid on local or server instances.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>TTS_OutputFile<br>
|
||||||
|
Definition of a fixed file name as mp3 output. The attribute is only relevant in conjunction with TTS_UseMP3Wrap.
|
||||||
|
If a file name is specified, then TTS_CacheFileDir is also taken into account.<br>
|
||||||
|
<code>attr myTTS TTS_OutputFile output.mp3</code><br>
|
||||||
|
<code>attr myTTS TTS_OutputFile /media/miniDLNA/output.mp3</code><br>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
|
<li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
|
||||||
@ -1434,18 +1485,24 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
|
|
||||||
<li><a href="#verbose">verbose</a><br>
|
<li><a href="#verbose">verbose</a><br>
|
||||||
<b>4:</b> each step will be logged<br>
|
<b>4:</b> each step will be logged<br>
|
||||||
<b>5:</b> Additionally the individual debug informations from mplayer and mp3wrap will be logged
|
<b>5:</b> Additionally the individual debug information from Mplayer and mp3wrap will be logged
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul><br>
|
</ul><br>
|
||||||
|
|
||||||
<a name="Text2SpeechExamples"></a>
|
<a name="Text2SpeechExamples"></a>
|
||||||
<b>Beispiele</b>
|
<b>Examples</b>
|
||||||
<ul>
|
<ul>
|
||||||
|
<code>define TTS_EG_WZ Text2Speech hw=/dev/snd/controlC3</code><br>
|
||||||
|
<code>attr TTS_EG_WZ TTS_Language English</code><br>
|
||||||
|
<code>attr TTS_EG_WZ TTS_Ressource Amazon-Polly</code><br>
|
||||||
|
<code>attr TTS_EG_WZ TTS_UseMP3Wrap 1</code><br><br>
|
||||||
|
<code>set MyTTS tts <speak>Mary had a little lamb.</speak></code>
|
||||||
|
<br>
|
||||||
<code>define MyTTS Text2Speech hw=0.0</code><br>
|
<code>define MyTTS Text2Speech hw=0.0</code><br>
|
||||||
<code>set MyTTS tts Die Alarmanlage ist bereit.</code><br>
|
<code>set MyTTS tts The alarm system is ready.</code><br>
|
||||||
<code>set MyTTS tts :beep.mp3:</code><br>
|
<code>set MyTTS tts :beep.mp3:</code><br>
|
||||||
<code>set MyTTS tts :mytemplates/alarm.mp3:Die Alarmanlage ist bereit.:ring.mp3:</code><br>
|
<code>set MyTTS tts :mytemplates/alarm.mp3:The alarm system is ready.:ring.mp3:</code><br>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
=end html
|
=end html
|
||||||
@ -1469,14 +1526,17 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
<li>
|
<li>
|
||||||
<b>Local Device</b><br>
|
<b>Local Device</b><br>
|
||||||
<ul>
|
<ul>
|
||||||
Die Ausgabe erfolgt auf angeschlossenen Audiodevices, zb. Lautsprecher direkt am Gerät oder per
|
Die Ausgabe wird an jedes angeschlossene Audiogerät gesendet. Zum Beispiel an einen lokalen Lautsprecher oder an
|
||||||
Bluetooth-Lautsprecher per Mplayer. Dazu ist Mplayer zu installieren.<br>
|
entfernte Geräte via Netzwerk, WiFI oder Bluetooth. Die Wiedergabe kann über MPlayer oder jede andere
|
||||||
|
Anwendung erfolgen.<br>
|
||||||
|
<br>
|
||||||
|
Mplayer-Installation unter Debian/Ubuntu/Raspbian:<br>
|
||||||
<code>apt-get install mplayer</code><br>
|
<code>apt-get install mplayer</code><br>
|
||||||
Das angegebene Alsadevice ist in der <code>/etc/asound.conf</code> zu konfigurieren.
|
Das angegebene Alsa-Device ist in der <code>/etc/asound.conf</code> zu konfigurieren.
|
||||||
<p>
|
<p>
|
||||||
<b>Special AlsaDevice: </b><i>default</i><br>
|
<b>Special AlsaDevice: </b><i>default</i><br>
|
||||||
Ist als Alsa-Device <i>default</i> angegeben, so wird mplayer ohne eine Audiodevice Angabe aufgerufen.
|
Ist als Alsa-Device <i>default</i> angegeben, so wird Mplayer ohne eine Audiodevice-Angabe aufgerufen.
|
||||||
Dementsprechend verwendet mplayer das Standard Audio Ausgabedevice.
|
Dementsprechend verwendet Mplayer dann das Standard-Audio Ausgabedevice.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<b>Beispiel:</b><br>
|
<b>Beispiel:</b><br>
|
||||||
@ -1492,27 +1552,28 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
Das Modul ist Client-Server fäas bedeutet, das auf der Haupt-FHEM Installation eine Text2Speech-Instanz
|
Das Modul ist Client-Server fäas bedeutet, das auf der Haupt-FHEM Installation eine Text2Speech-Instanz
|
||||||
als Remote definiert wird. Auf dem Client wird Text2Speech als Local definiert. Die Sprachausgabe erfolgt auf
|
als Remote definiert wird. Auf dem Client wird Text2Speech als Local definiert. Die Sprachausgabe erfolgt auf
|
||||||
der lokalen Instanz.<br>
|
der lokalen Instanz.<br>
|
||||||
Zu beachten ist, das die Text2Speech Instanz (Definition als local Device) auf dem Zieldevice identisch benannt ist.
|
Zu beachten ist, dass die Text2Speech Instanz (Definition als Local-Device) auf dem Zieldevice identisch benannt ist.
|
||||||
<ul>
|
<ul>
|
||||||
<li>Host: Angabe der IP-Adresse</li>
|
<li>Host: Angabe der IP-Adresse</li>
|
||||||
<li>PortNr: Angabe des TelnetPorts von FHEM; default: 7072</li>
|
<li>PortNr: Angabe des Telnet-Ports von FHEM; default: 7072</li>
|
||||||
<li>SSL: Angabe ob der der Zugriff per SSL erfolgen soll oder nicht; default: kein SSL</li>
|
<li>SSL: Angabe, ob der Zugriff per SSL erfolgen soll oder nicht; default: kein SSL</li>
|
||||||
<li>PortPassword: Angabe des in der Ziel-FHEM-Installtion angegebene Telnet Portpasswort</li>
|
<li>PortPassword: Angabe des in der Ziel-FHEM-Installation angegebenen Telnet-Passworts</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
<b>Beispiel:</b><br>
|
<b>Beispiel:</b><br>
|
||||||
<code>define MyTTS Text2Speech 192.168.178.10:7072 fhempasswd</code>
|
<code>define MyTTS Text2Speech 192.168.178.10:7072 fhempasswd</code>
|
||||||
<code>define MyTTS Text2Speech 192.168.178.10</code>
|
<code>define MyTTS Text2Speech 192.168.178.10</code>
|
||||||
</p>
|
</p>
|
||||||
Wenn ein PRESENCE Gerät die Host IP-Adresse abfragt, wird die blockierende interne Prüfung auf Erreichbarkeit umgangen und das PRESENCE Gerät genutzt.
|
Wenn ein PRESENCE Gerät die Host-IP-Adresse abfragt, wird die blockierende interne Prüfung auf Erreichbarkeit umgangen und das PRESENCE Gerät genutzt.
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<b>Server Device</b>
|
<b>Server Device</b>
|
||||||
<ul>
|
<ul>
|
||||||
Im Falle der Verwendung als Server, wird nur die MP3 Datei erstellt und als Reading lastFilename dargestellt. Es macht keinen Sinn
|
Im Falle der Verwendung als Server wird nur die MP3-Datei erstellt und als Reading lastFilename dargestellt.
|
||||||
hier das Attribut <i>TTS_speakAsFastAsPossible</i> zu verwenden. Die Verwendung des Attributes <i>TTS_useMP3Wrap</i> wird dringend empfohlen.
|
Es ergibt keinen Sinn hier das Attribut <i>TTS_speakAsFastAsPossible</i> zu verwenden.
|
||||||
|
Die Verwendung des Attributs <i>TTS_useMP3Wrap</i> wird dringend empfohlen.
|
||||||
Ansonsten wird hier nur der letzte Teiltext als mp3 Datei im Reading dargestellt.
|
Ansonsten wird hier nur der letzte Teiltext als mp3 Datei im Reading dargestellt.
|
||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
@ -1530,8 +1591,8 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
<li><b>tts</b>:<br>
|
<li><b>tts</b>:<br>
|
||||||
Setzen eines Textes zur Sprachausgabe. Um mp3-Dateien direkt auszugeben, müssen diese mit führenden
|
Setzen eines Textes zur Sprachausgabe. Um mp3-Dateien direkt auszugeben, müssen diese mit führenden
|
||||||
und schließenden Doppelpunkten angegebenen sein. Die MP3-Dateien müssen unterhalb des Verzeichnisses <i>TTS_FileTemplateDir</i> gespeichert sein.<br>
|
und schließenden Doppelpunkten angegebenen sein. Die MP3-Dateien müssen unterhalb des Verzeichnisses <i>TTS_FileTemplateDir</i> gespeichert sein.<br>
|
||||||
Der Text selbst darf deshalb selbst keine Doppelpunte beinhalten. <br>
|
Der Text selbst darf deshalb selbst keine Doppelpunkte beinhalten. <br>
|
||||||
Für die SpracheEngine Amazon Polly kann auch SSML verwendet werden, Siehe Beispiele.
|
Für die Sprachengine Amazon Polly kann auch SSML verwendet werden. Siehe Beispiele.
|
||||||
</li>
|
</li>
|
||||||
<li><b>volume</b>:<br>
|
<li><b>volume</b>:<br>
|
||||||
Setzen der Ausgabe Lautstärke.<br>
|
Setzen der Ausgabe Lautstärke.<br>
|
||||||
@ -1549,13 +1610,13 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
<li>TTS_Delimiter<br>
|
<li>TTS_Delimiter<br>
|
||||||
Optional: Wird ein Delimiter angegeben, so wird der Sprachbaustein an dieser Stelle geteilt.
|
Optional: Wird ein Delimiter angegeben, so wird der Sprachbaustein an dieser Stelle geteilt.
|
||||||
Als Delimiter ist nur ein einzelnes Zeichen zulässig.
|
Als Delimiter ist nur ein einzelnes Zeichen zulässig.
|
||||||
Hintergrund ist die Tatsache, das die einige Sprachengines nur eine bestimmt Anzahl an Zeichen (zb. Google nur 100Zeichen) zulässt.<br>
|
Hintergrund ist die Tatsache, dass die einige Sprachengines nur eine bestimmte Anzahl an Zeichen (z. B. Google nur 100Zeichen) zulässt.<br>
|
||||||
Im Standard wird nach jedem Satzende geteilt. Ist ein einzelner Satz länger als 100 Zeichen,
|
Im Standard wird nach jedem Satzende geteilt. Ist ein einzelner Satz länger als 100 Zeichen,
|
||||||
so wird zusätzlich nach Kommata, Semikolon und dem Verbindungswort <i>und</i> geteilt.<br>
|
so wird zusätzlich nach Kommata, Semikolon und dem Verbindungswort <i>und</i> geteilt.<br>
|
||||||
Achtung: Nur bei einem lokal definierter Text2Speech Instanz möglich!<br>
|
Achtung: Nur bei einem lokal definierter Text2Speech Instanz möglich!<br>
|
||||||
<b>Notation</b><br>
|
<b>Notation</b><br>
|
||||||
+ -> erzwinge das Trennen, auch wenn Textbaustein < x Zeichen<br>
|
+ -> erzwinge das Trennen, auch wenn Textbaustein < x Zeichen<br>
|
||||||
- -> Trenne nur wenn Textbaustein > x Zeichen
|
- -> trenne, nur wenn Textbaustein > x Zeichen
|
||||||
af -> add first -> füge den Delimiter am Satzanfang wieder hinzu<br>
|
af -> add first -> füge den Delimiter am Satzanfang wieder hinzu<br>
|
||||||
al -> add last -> füge den Delimiter am Satzende wieder hinzu<br>
|
al -> add last -> füge den Delimiter am Satzende wieder hinzu<br>
|
||||||
an -> add nothing -> Delimiter nicht wieder hinzufügen<br>
|
an -> add nothing -> Delimiter nicht wieder hinzufügen<br>
|
||||||
@ -1569,22 +1630,22 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
Achtung: Nur bei einem lokal definierter Text2Speech Instanz möglich!
|
Achtung: Nur bei einem lokal definierter Text2Speech Instanz möglich!
|
||||||
<ul>
|
<ul>
|
||||||
<li>Google<br>
|
<li>Google<br>
|
||||||
Nutzung der Google Sprachengine. Ein Internetzugriff ist notwendig! Aufgrund der Qualität ist der
|
Google Sprachengine. Voraussetzung: Aktive Internetverbindung<br>
|
||||||
Einsatz diese Engine zu empfehlen und der Standard.
|
Aufgrund der Qualität ist der Einsatz der Engine empfohlen und daher der Standard.
|
||||||
</li>
|
</li>
|
||||||
<li>VoiceRSS<br>
|
<li>VoiceRSS<br>
|
||||||
Nutzung der VoiceRSS Sprachengine. Die Nutzung ist frei bis zu 350 Anfragen pro Tag.
|
VoiceRSS Sprachengine. Voraussetzung: Aktive Internetverbindung<br>
|
||||||
Wenn mehr benötigt werden ist ein Bezahlmodell wählbar. Ein Internetzugriff ist notwendig!
|
Die Nutzung ist frei bis zu 350 Anfragen pro Tag. Wenn mehr benötigt werden, ist ein Bezahlmodell wählbar.
|
||||||
Aufgrund der Qualität ist der Einsatz diese Engine ebenfalls zu empfehlen.
|
Aufgrund der Qualität ist der Einsatz dieser Engine ebenfalls empfohlen.
|
||||||
Wenn diese Engine benutzt wird, ist ein APIKey notwendig (siehe TTS_APIKey)
|
Wird diese Engine benutzt, ist ein APIKey notwendig (siehe TTS_APIKey)
|
||||||
</li>
|
</li>
|
||||||
<li>ESpeak<br>
|
<li>ESpeak<br>
|
||||||
Nutzung der ESpeak Offline Sprachengine. Die Qualitä ist schlechter als die Google Engine.
|
ESpeak Sprachengine. Voraussetzung: Installation von Espeak und lame<br>
|
||||||
ESpeak und lame sind vor der Nutzung zu installieren.<br>
|
eSpeak ist ein Open-Source-Software-Sprachsynthesizer für Englisch und andere Sprachen.
|
||||||
<code>apt-get install espeak lame</code>
|
Die Qualitä ist schlechter als die der Google Engine<br>
|
||||||
</li>
|
</li>
|
||||||
<li>SVOX-pico<br>
|
<li>SVOX-pico<br>
|
||||||
Nutzung der SVOX-Pico TTS-Engine (aus dem AOSP).<br>
|
SVOX-Pico TTS-Engine (aus dem AOSP). Voraussetzung: Installation von SVOX-Pico and lame<br>
|
||||||
Die Sprachengine sowie <code>lame</code> müssen installiert sein:<br>
|
Die Sprachengine sowie <code>lame</code> müssen installiert sein:<br>
|
||||||
<code>sudo apt-get install libttspico-utils lame</code><br><br>
|
<code>sudo apt-get install libttspico-utils lame</code><br><br>
|
||||||
Für ARM/Raspbian sind die <code>libttspico-utils</code> leider nicht verfügbar,<br>
|
Für ARM/Raspbian sind die <code>libttspico-utils</code> leider nicht verfügbar,<br>
|
||||||
@ -1595,8 +1656,8 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
<code>sudo dpkg --install pico2wave.deb</code>
|
<code>sudo dpkg --install pico2wave.deb</code>
|
||||||
</li>
|
</li>
|
||||||
<li>Amazon-Polly<br>
|
<li>Amazon-Polly<br>
|
||||||
Nutzung der Amazon Polly Sprachengine, dieselbe Engine wie für Amazon Alexa verwendet wird.<br>
|
Amazon Polly Sprachengine. Voraussetzung: Aktive Internetverbindung und Perl Package Paws<br>
|
||||||
Es muss das Perl Package Paws installiert sowie ein AWS Konto und ein Polly AWS User verfügbar sein<br>
|
Amazon-Dienst, der Text in lebensechte Sprache umwandelt. Ein AWS Konto und ein Polly AWS User müssen verfügbar sein<br>
|
||||||
<code>cpan paws</code><br>
|
<code>cpan paws</code><br>
|
||||||
Die Zugangsdaten zum eigenen AWS Konto müssen unter ~/.aws/credentials liegen. <br>
|
Die Zugangsdaten zum eigenen AWS Konto müssen unter ~/.aws/credentials liegen. <br>
|
||||||
<code>[default]
|
<code>[default]
|
||||||
@ -1608,12 +1669,12 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_Language<br>
|
<li>TTS_Language<br>
|
||||||
Auswahl verschiendener Standardsprachen
|
Auswahl verschiedener Standardsprachen.
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_Language_Custom<br>
|
<li>TTS_Language_Custom<br>
|
||||||
Möchte man eine Spreche und Stimme abweichend der Standardspreachen verwenden, so kann man diese hier eintragen. <br>
|
Möchte man eine Sprache und Stimme abweichend der Standardsprachen verwenden, so kann man diese hier eintragen. <br>
|
||||||
Die Definition ist abhängig der verwendeten Sprachengine. Diesea Attribut überschreibt ein ev. vorhandenes TTS_Langugae Attribut.<br>
|
Die Definition ist abhängig der verwendeten Sprachengine. Dieses Attribut überschreibt ein ev. vorhandenes TTS_Langugae Attribut.<br>
|
||||||
Siehe in die jeweilige API Referenz
|
Siehe in die jeweilige API Referenz
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
@ -1628,10 +1689,10 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_CacheFileDir<br>
|
<li>TTS_CacheFileDir<br>
|
||||||
Optional: Die per Google geladenen Sprachbausteine werden in diesem Verzeichnis zur Wiedeverwendung abgelegt.
|
Optional: Die per Google geladenen Sprachbausteine werden in diesem Verzeichnis zur Wiederverwendung abgelegt.
|
||||||
Es findet zurZeit keine automatisierte Löschung statt.<br>
|
Es findet zurzeit keine automatisierte Löschung statt.<br>
|
||||||
Default: <i>cache/</i><br>
|
Default: <i>cache/</i><br>
|
||||||
Achtung: Nur bei einem lokal definierter Text2Speech Instanz möglich!
|
Achtung: Nur bei einer lokal definierten Text2Speech-Instanz möglich!
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_UseMP3Wrap<br>
|
<li>TTS_UseMP3Wrap<br>
|
||||||
@ -1639,21 +1700,27 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
geladenen Sprachbausteine zu einem einzelnen Sprachbaustein zusammenfassen zu lassen bevor dieses per
|
geladenen Sprachbausteine zu einem einzelnen Sprachbaustein zusammenfassen zu lassen bevor dieses per
|
||||||
Mplayer ausgegeben werden. Dazu muss Mp3Wrap installiert werden.<br>
|
Mplayer ausgegeben werden. Dazu muss Mp3Wrap installiert werden.<br>
|
||||||
<code>apt-get install mp3wrap</code><br>
|
<code>apt-get install mp3wrap</code><br>
|
||||||
Achtung: Nur bei einem lokal definierter Text2Speech Instanz möglich!
|
Achtung: Nur bei einer lokal definierten Text2Speech-Instanz möglich!
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_MplayerCall<br>
|
<li>TTS_MplayerCall<br>
|
||||||
Optional: Angabe des Systemaufrufes zu Mplayer oder einem anderem Tool. Wird ein anderes Tool als mplayer<br>
|
Optional: Angabe des Systemaufrufs für einen alternativen Player. Wird der Aufruf gesetzt,<br>
|
||||||
dort verwendet gelten folgende Templates: <br>
|
können folgende Templates genutzt werden: <br>
|
||||||
<ul>
|
<ul>
|
||||||
<li>{device}</li>
|
<li>{device}</li>
|
||||||
<li>{volume}</li>
|
<li>{volume}</li>
|
||||||
<li>{volumeadjust}</li>
|
<li>{volumeadjust}</li>
|
||||||
<li>{file}</li>
|
<li>{file}</li>
|
||||||
|
<li>{options}</li>
|
||||||
</ul>
|
</ul>
|
||||||
Beispiele:<br>
|
{options} werden als Text in Klammern bei der Ausführung von set gesetzt, um beispielsweise spezielle
|
||||||
<code>attr myTTS TTS_MplayerCall sudo /usr/bin/mplayer</code>
|
Parameter für jeden Aufruf separat zu setzen<br>
|
||||||
<code>attr myTTS TTS_MplayerCall AUDIODEV={device} play -q -v {volume} {file}</code>
|
Beispiel: <code>set myTTS tts [192.168.0.1:7000] Das ist mein Text</code><br><br>
|
||||||
|
|
||||||
|
Beispiel der Definition:<br>
|
||||||
|
<code>attr myTTS TTS_MplayerCall sudo /usr/bin/mplayer</code><br>
|
||||||
|
<code>attr myTTS TTS_MplayerCall AUDIODEV={device} play -q -v {volume} {file}</code><br>
|
||||||
|
<code>attr myTTS TTS_MplayerCall player {file} {options}</code><br>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_SentenceAppendix<br>
|
<li>TTS_SentenceAppendix<br>
|
||||||
@ -1664,8 +1731,8 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_FileMapping<br>
|
<li>TTS_FileMapping<br>
|
||||||
Angabe von möglichen MP3-Dateien mit deren Templatedefinition. Getrennt duch Leerzeichen.
|
Angabe von möglichen MP3-Dateien mit deren Template-Definition. Getrennt durch Leerzeichen.
|
||||||
Die Templatedefinitionen können in den per <i>tts</i> übergebenen Sprachbausteinen verwendet werden
|
Die Template-Definitionen können in den per <i>tts</i> übergebenen Sprachbausteinen verwendet werden
|
||||||
und müssen mit einem beginnenden und endenden Doppelpunkt angegeben werden.
|
und müssen mit einem beginnenden und endenden Doppelpunkt angegeben werden.
|
||||||
Die Dateien müssen im Verzeichnis <i>TTS_FileTemplateDir</i> gespeichert sein.<br>
|
Die Dateien müssen im Verzeichnis <i>TTS_FileTemplateDir</i> gespeichert sein.<br>
|
||||||
<code>attr myTTS TTS_FileMapping ring:ringtone.mp3 beep:MyBeep.mp3</code><br>
|
<code>attr myTTS TTS_FileMapping ring:ringtone.mp3 beep:MyBeep.mp3</code><br>
|
||||||
@ -1685,34 +1752,33 @@ sub Text2Speech_WriteStats($$$$){
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_noStatisticsLog<br>
|
<li>TTS_noStatisticsLog<br>
|
||||||
<b>1</b>, verhindert das Loggen von Statistikdaten in DbLog Geräten, default ist <b>0</b><br>
|
<b>1</b>, verhindert das Loggen von Statistikdaten in DbLog Geräten. Default ist <b>0</b><br>
|
||||||
Bitte zur Beachtung: Das Logging ist wichtig um alte, lang nicht genutzte Cachedateien automatisiert zu loeschen.
|
Hinweis: Das Logging ist wichtig um alte, lang nicht genutzte Cachedateien automatisiert zu löschen.
|
||||||
Wenn dieses hier dektiviert wird muss sich der User selbst darum kuemmern.
|
Wird die Option hier aktiviert, muss sich der Nutzer selbst darum küümmern.
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_speakAsFastAsPossible<br>
|
<li>TTS_speakAsFastAsPossible<br>
|
||||||
Es wird versucht, so schnell als möglich eine Sprachausgabe zu erzielen. Bei Sprachbausteinen die nicht bereits lokal vorliegen,
|
Es wird versucht, so schnell als möglich eine Sprachausgabe zu erzielen. Bei Sprachbausteinen
|
||||||
ist eine kurze Pause wahrnehmbar. Dann wird der benötigte Sprachbaustein nachgeladen. Liegen alle Sprachbausteine im Cache vor,
|
die nicht bereits lokal vorliegen, ist eine kurze Pause wahrnehmbar. Dann wird der benötigte
|
||||||
so hat dieses Attribut keine Auswirkung.<br>
|
Sprachbaustein nachgeladen. Liegen alle Sprachbausteine im Cache vor, so hat dieses Attribut keine Auswirkung.<br>
|
||||||
Attribut nur verfügbar bei einer lokalen oder Server Instanz
|
Attribut nur verfügbar bei einer lokalen oder Server Instanz
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>TTS_OutputFile<br>
|
<li>TTS_OutputFile<br>
|
||||||
Angabe eines fixen Dateinamens als mp3 Output. Das Attribut ist nur relevant in Verbindung mit TTS_UseMP3Wrap.<br>
|
Angabe eines fixen Dateinamens als mp3 Output. Das Attribut ist nur relevant in Verbindung mit TTS_UseMP3Wrap.<br>
|
||||||
Wenn ein Dateinamen angegeben wird, so wird zusätzlich TTS_CacheFileDir beachtet. Bei einer absoluten Pfadangabe <br>
|
Wenn ein Dateiname angegeben wird, so wird zusätzlich TTS_CacheFileDir beachtet. Bei einer absoluten Pfadangabe
|
||||||
muss der Dateipfad durch FHEM schreibbar sein.<br>
|
muss der Dateipfad durch FHEM schreibbar sein.<br>
|
||||||
<code>attr myTTS TTS_OutputFile output.mp3</code><br>
|
<code>attr myTTS TTS_OutputFile output.mp3</code><br>
|
||||||
<code>attr myTTS TTS_OutputFile /media/miniDLNA/output.mp3</code><br>
|
<code>attr myTTS TTS_OutputFile /media/miniDLNA/output.mp3</code><br>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li><a href="#readingFnAttributes">readingFnAttributes</a>
|
<li><a href="#readingFnAttributes">readingFnAttributes</a>
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<li><a href="#disable">disable</a><br>
|
<li><a href="#disable">disable</a><br>
|
||||||
If this attribute is activated, the soundoutput will be disabled.<br>
|
Wird das Attribut aktiviert, wird die Audioausgabe deaktiviert.<br>
|
||||||
Possible values: 0 => not disabled , 1 => disabled<br>
|
Mögliche Werte: 0 => nicht deaktiviert , 1 => deaktiviert<br>
|
||||||
Default Value is 0 (not disabled)<br><br>
|
Standardwert ist 0 (nicht deaktiviert)<br><br>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li><a href="#verbose">verbose</a><br>
|
<li><a href="#verbose">verbose</a><br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user