[multimedia] Add record and transcribe commands (#2295)
* [multimedia] Add record and transcribe commands Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com> * apply pr review Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com> * fix md errors Signed-off-by: Stefan Höhn <mail@stefanhoehn.com> --------- Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com> Signed-off-by: Stefan Höhn <mail@stefanhoehn.com> Co-authored-by: stefan-hoehn <mail@stefanhoehn.com>pull/2286/head
parent
f5f8cc4be0
commit
9474dc3bdf
|
@ -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
|
||||
openhab> openhab: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.
|
||||
|
|
|
@ -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).
|
||||
|
|
Loading…
Reference in New Issue