From e903b0d0c7dfb73a4807deda6819b0b99141de98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81lvarez?= Date: Sun, 12 May 2024 11:58:57 +0200 Subject: [PATCH 1/3] [multimedia] Add record and transcribe commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Álvarez --- configuration/multimedia.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/configuration/multimedia.md b/configuration/multimedia.md index 36e6faeeda..e6512627db 100644 --- a/configuration/multimedia.md +++ b/configuration/multimedia.md @@ -31,7 +31,7 @@ The distribution comes with these options built-in: | Output Device | Audio Source | Description | |---------------|-------------------|-------------------------------------------------| -| `javasound` | System Microphone | This uses the Java Sound API for audio capture. | +| `javasound` | System Microphone | This uses the Java Sound API for audio capture. | Additionally, certain bindings register their supported devices as audio sources, e.g. PulseAudio. @@ -46,6 +46,14 @@ openhab> openhab:audio sources You can define the default audio source either by textual configuration in `$OPENHAB_CONF/services/runtime.cfg` or in the UI in `Settings->Audio`. +You can also record wav audio files using the console, you should provide the desired record duration in seconds and its filename, if you do not specify the source the default will be used: + +```text +audio record javasound 10 hello.wav +``` + +The generated record will be saved at the folder `$OPENHAB_CONF/sounds`. + ## Audio Playback openHAB is able to play sound either from the file system (files need to be put in the folder `$OPENHAB_CONF/sounds`), from URLs (e.g. Internet radio streams) or generated by text-to-speech engines (which are available as optional [Voice add-ons](/addons/#voice)). @@ -342,7 +350,7 @@ openhab> openhab:voice startdialog --source javasound --sink sonos:PLAY5:kitchen # list running dialogs openhab> openhab:voice dialogs # register a dialog (same as start but persisting the configuration to spawn dialog on restart or temporal service unavailability). -openhab> openhab:voice registerdialog --source javasound --sink sonos:PLAY5:kitchen --hlis system,rulehli --stt voicerss --tts voskstt --keyword terminator --ks rustpotterks +openhab> openhab:voice registerdialog --source javasound --sink sonos:PLAY5:kitchen --hlis system,rulehli --tts voicerss --stt voskstt --keyword terminator --ks rustpotterks # list dialogs registrations openhab> openhab:voice dialogregs # stop a dialog @@ -350,7 +358,9 @@ openhab> openhab:voice stopdialog --source javasound # unregister a dialog, and stop if running openhab> openhab:voice unregisterdialog --source javasound # run single shot dialog -openhab> openhab:voice listenandanswer --source javasound --sink sonos:PLAY5:kitchen --hlis system,rulehli --stt voicerss --tts voskstt --keyword terminator --ks rustpotterks +openhab> openhab:voice listenandanswer --source javasound --sink sonos:PLAY5:kitchen --hlis system,rulehli --tts voicerss --stt voskstt --keyword terminator --ks rustpotterks +# run transcription and output to the console +openhab> openhab:voice transcribe --source javasound --stt voskstt ``` When an argument is not provided in the command line, the default from the voice settings is used. From 711c5b347617ab1e98268c29e52dd80182f0be10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81lvarez?= Date: Sun, 12 May 2024 12:30:45 +0200 Subject: [PATCH 2/3] apply pr review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Álvarez --- configuration/multimedia.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration/multimedia.md b/configuration/multimedia.md index e6512627db..70a725b8c2 100644 --- a/configuration/multimedia.md +++ b/configuration/multimedia.md @@ -49,7 +49,7 @@ You can define the default audio source either by textual configuration in `$OPE You can also record wav audio files using the console, you should provide the desired record duration in seconds and its filename, if you do not specify the source the default will be used: ```text -audio record javasound 10 hello.wav +openhab> openhab:audio record javasound 10 hello.wav ``` The generated record will be saved at the folder `$OPENHAB_CONF/sounds`. From a308c13d86904eff5bf510a6dac60fbcb03e2c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20H=C3=B6hn?= Date: Sun, 19 May 2024 23:05:29 +0200 Subject: [PATCH 3/3] fix md errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Höhn --- developers/bindings/thing-xml.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developers/bindings/thing-xml.md b/developers/bindings/thing-xml.md index 0b011751bb..b4af026fad 100644 --- a/developers/bindings/thing-xml.md +++ b/developers/bindings/thing-xml.md @@ -927,4 +927,4 @@ Modifying or removing update instructions after they have been merged is not per Each new contribution of update instructions MUST increase the `thingTypeVersion`, even if there was no release. The `thingTypeVersion` is bound to a thing-type, different thing types may have different versions. -The full XML schema for update instructions can be found here: [https://www.openhab.org/schemas/update-description-1.0.0.xsd](https://www.openhab.org/schemas/update-description-1.0.0.xsd). +The full XML schema for update instructions can be found here: [https://www.openhab.org/schemas/update-description-1.0.0.xsd](https://www.openhab.org/schemas/update-description-1.0.0.xsd).