[voice] Minor changes requested during review of PR #2693 (#2729)

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
pull/2737/head
lolodomo 2022-02-03 20:25:32 +01:00 committed by GitHub
parent 8c16cb6e93
commit 3e94dd6e30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 13 deletions

View File

@ -160,12 +160,8 @@ public class DialogProcessor implements KSListener, STTListener {
private void closeStreamKS() {
AudioStream stream = streamKS;
if (stream != null) {
// Due to the current implementation of JavaSoundAudioSource, the stream is not closed as it would
// lead to problem
// try {
// stream.close();
// } catch (IOException e1) {
// }
// Due to an issue in JavaSoundAudioSource ( https://github.com/openhab/openhab-core/issues/2702 )
// we do not try closing the stream
streamKS = null;
}
}
@ -182,12 +178,8 @@ public class DialogProcessor implements KSListener, STTListener {
private void closeStreamSTT() {
AudioStream stream = streamSTT;
if (stream != null) {
// Due to the current implementation of JavaSoundAudioSource, the stream is not closed as it would
// lead to problem
// try {
// stream.close();
// } catch (IOException e1) {
// }
// Due to an issue in JavaSoundAudioSource ( https://github.com/openhab/openhab-core/issues/2702 )
// we do not try closing the stream
streamSTT = null;
}
}

View File

@ -77,7 +77,7 @@ public class VoiceConsoleCommandExtension extends AbstractConsoleCommandExtensio
return List.of(buildCommandUsage(SUBCMD_SAY + " <text>", "speaks a text"),
buildCommandUsage(SUBCMD_INTERPRET + " <command>", "interprets a human language command"),
buildCommandUsage(SUBCMD_VOICES, "lists available voices of the TTS services"),
buildCommandUsage(SUBCMD_START_DIALOG + " [<source> <interpreter> <sink> <keyword>]",
buildCommandUsage(SUBCMD_START_DIALOG + " [<source> [<interpreter> [<sink> [<keyword>]]]]",
"start a new dialog processing using the default services or the services identified with provided arguments"),
buildCommandUsage(SUBCMD_STOP_DIALOG + " [<source>]",
"stop the dialog processing for the default audio source or the audio source identified with provided argument"));