# Picotts on RPi throws an error

**URL:** <https://community.openhab.org/t/picotts-on-rpi-throws-an-error/82109>\
**Category:** Beginners\
**Created:** [September 18, 2019, 7:49am UTC](https://community.openhab.org/t/picotts-on-rpi-throws-an-error/82109 "2019-09-18T07:49:58Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![aditya\_Sharma](https://community.openhab.org/user_avatar/community.openhab.org/aditya_sharma/32/39400_2.png) [@aditya\_Sharma](https://community.openhab.org/u/aditya_Sharma)\
**Post date:** [September 18, 2019, 7:49am UTC](https://community.openhab.org/t/picotts-on-rpi-throws-an-error/82109/1 "2019-09-18T07:49:58Z")

</div>

- Platform information:
  - Hardware: Raspberry Pi 3 b+
  - OS: Docker on raspbian stretch lite
  - openHAB version:openHAB 2.5.0.M3 Milestone Build

- Issue of the topic:  
I run openhab in a docker container on my RPi 3 b+. I wanted to add local voice control so added a microphone and speaker to the RPi and installed Snips-ai on the same RPi. This much works well for me till now. Now I want to add “picotts” to speak out sentences from the connected speaker output. So I installed the addon named “picotts” and in the rules, added the command say as below:

```auto
rule "Snips"
when
    Item SnipsIntent received update
then
    var String sessionId = transform("JSONPATH", "$.sessionId", SnipsIntent.state.toString);
    sessionId = "{ \"sessionId\":\""+ sessionId + "\" }"
    val actions = getActions("mqtt","mqtt:broker:brokerthingid")
    actions.publishMQTT("hermes/dialogueManager/endSession",sessionId)
    say("Hi! this is a voice test");
end

```

The rest of the rule runs well(except the say command), but no speech comes out of the speaker. In the logs following error is thrown

2019-09-18 12:50:30.374 [WARN] [core.voice.internal.VoiceManagerImpl] - Error saying ‘Hi! this is a voice test’: org.eclipse.smarthome.core.audio.AudioException$  
org.eclipse.smarthome.core.voice.TTSException: org.eclipse.smarthome.core.audio.AudioException: Error while executing '[Ljava.lang.String;@8a0$  
at org.openhab.voice.picotts.internal.PicoTTSService.synthesize(PicoTTSService.java:73) ~[?:?]  
at org.eclipse.smarthome.core.voice.internal.VoiceManagerImpl.say(VoiceManagerImpl.java:219) ~[?:?]  
at org.eclipse.smarthome.model.script.actions.Voice.say(Voice.java:121) ~[?:?]  
at org.eclipse.smarthome.model.script.actions.Voice.say(Voice.java:40) ~[?:?]  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]  
at java.lang.Thread.run(Thread.java:748) [?:?]  
Caused by: org.eclipse.smarthome.core.audio.AudioException: Error while executing ‘[Ljava.lang.String;@8a087a’  
at org.openhab.voice.picotts.internal.PicoTTSAudioStream.createInputStream(PicoTTSAudioStream.java:64) ~[?:?]  
at org.openhab.voice.picotts.internal.PicoTTSAudioStream.(PicoTTSAudioStream.java:45) ~[?:?]  
at org.openhab.voice.picotts.internal.PicoTTSService.synthesize(PicoTTSService.java:71) ~[?:?]  
… 31 more  
Caused by: java.io.IOException: Cannot run program “pico2wave”: error=2, No such file or directory  
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) ~[?:?]  
at java.lang.Runtime.exec(Runtime.java:621) ~[?:?]  
at java.lang.Runtime.exec(Runtime.java:486) ~[?:?]  
at org.openhab.voice.picotts.internal.PicoTTSAudioStream.createInputStream(PicoTTSAudioStream.java:58) ~[?:?]  
at org.openhab.voice.picotts.internal.PicoTTSAudioStream.(PicoTTSAudioStream.java:45) ~[?:?]  
at org.openhab.voice.picotts.internal.PicoTTSService.synthesize(PicoTTSService.java:71) ~[?:?]  
… 31 more  
Caused by: java.io.IOException: error=2, No such file or directory  
at java.lang.UNIXProcess.forkAndExec(Native Method) ~[?:?]  
at java.lang.UNIXProcess.(UNIXProcess.java:247) ~[?:?]

Am I missing some vital steps or has it something to do with the docker install of openhab(which I am using) or maybe due to it being a milestone build???

---

<div class="post-metadata">

**Author:** ![vzorglub](https://community.openhab.org/user_avatar/community.openhab.org/vzorglub/32/17166_2.png) [@vzorglub](https://community.openhab.org/u/vzorglub)\
**Post date:** [September 18, 2019, 7:55am UTC](https://community.openhab.org/t/picotts-on-rpi-throws-an-error/82109/2 "2019-09-18T07:55:06Z")

</div>

Hello,  
Your post has no details

> [@How to ask a good question / Help Us Help You](https://community.openhab.org/t/how-to-ask-a-good-question-help-us-help-you/58396):
>
> Before you ask… Community forum is NOT a helpdesk Let’s put this in the front: nobody here works for openHAB. The community members are helping with an Open Source Project, not a commercial software. Additionally, the forum is NOT dealing with general Home Automation topics, the focus is on openHAB. In some cases, various products or technologies which are not directly linked to openHAB can be discussed but with the proper [title](#five), [category](#four) or [tag](#six). We are ALL volunteering our free time to help o…

---

<div class="post-metadata">

**Author:** ![aditya\_Sharma](https://community.openhab.org/user_avatar/community.openhab.org/aditya_sharma/32/39400_2.png) [@aditya\_Sharma](https://community.openhab.org/u/aditya_Sharma)\
**Post date:** [September 18, 2019, 8:03am UTC](https://community.openhab.org/t/picotts-on-rpi-throws-an-error/82109/3 "2019-09-18T08:03:56Z")

</div>

Okay I will try giving more details as much as I can. Pardon me for my mistakes. I am pretty new to openhab.

---

<div class="post-metadata">

**Author:** ![aditya\_Sharma](https://community.openhab.org/user_avatar/community.openhab.org/aditya_sharma/32/39400_2.png) [@aditya\_Sharma](https://community.openhab.org/u/aditya_Sharma)\
**Post date:** [September 18, 2019, 8:16am UTC](https://community.openhab.org/t/picotts-on-rpi-throws-an-error/82109/4 "2019-09-18T08:16:12Z")

</div>

Hi, I edited the post a bit to explain the issue I face. Please point me in the right direction.

---

<div class="post-metadata">

**Author:** ![aditya\_Sharma](https://community.openhab.org/user_avatar/community.openhab.org/aditya_sharma/32/39400_2.png) [@aditya\_Sharma](https://community.openhab.org/u/aditya_Sharma)\
**Post date:** [September 18, 2019, 8:26am UTC](https://community.openhab.org/t/picotts-on-rpi-throws-an-error/82109/5 "2019-09-18T08:26:46Z")

</div>

I tried to search as much as i could about “tts” and also specifically “picotts” but there are not many posts about that in the forums. Searched the openhab documentation but not even lucky there.  
Seems like picotts is meant to be up and running just after installing the addon. There is no mention of the error I am facing on the internet.  
So I guess maybe its because of running the setup on docker or maybe because of this being a milestone build.

---

<div class="post-metadata">

**Author:** ![aditya\_Sharma](https://community.openhab.org/user_avatar/community.openhab.org/aditya_sharma/32/39400_2.png) [@aditya\_Sharma](https://community.openhab.org/u/aditya_Sharma)\
**Post date:** [September 18, 2019, 9:41am UTC](https://community.openhab.org/t/picotts-on-rpi-throws-an-error/82109/6 "2019-09-18T09:41:44Z")

</div>

picotts itself is working on my RPi.  
Tested with the following commands.  
pico2wave -w hello.wav “Hello”  
aplay /home/pi/hello.wav

This speaks Hello from the attached speaker.

But openhab is not able to access that with the command “Say” as it throws error.  
So maybe an issue definitely due to the docker install.

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [September 18, 2019, 3:52pm UTC](https://community.openhab.org/t/picotts-on-rpi-throws-an-error/82109/7 "2019-09-18T15:52:12Z")

</div>

> [@aditya\_Sharma](#):
>
> So maybe an issue definitely due to the docker install.

I have no experience with Picotts or say, but I think there may be some confusion about how Docker works.

The openHAB container does not have access to _anything_ on your host unless you explicitly give it access to it. And it doesn’t have access to _any software_ on your host at all. If you are running Oh in Docker, you need to install Picotts in the Docker Image the openHAB container is based upon. Furthermore, you need to give the container access to the sound device on your host.

tl;dr, the container can’t see picotts. That’s part of the point of running in containers.

---

<div class="post-metadata">

**Author:** ![ei\_Gelb\_Geek](https://community.openhab.org/user_avatar/community.openhab.org/ei_gelb_geek/32/14503_2.png) [@ei\_Gelb\_Geek](https://community.openhab.org/u/ei_Gelb_Geek)\
**Post date:** [September 18, 2019, 5:23pm UTC](https://community.openhab.org/t/picotts-on-rpi-throws-an-error/82109/8 "2019-09-18T17:23:56Z")

</div>

> [@aditya\_Sharma](#):
>
> Caused by: java.io.IOException: Cannot run program “pico2wave”: error=2, No such file or directory

Docker on Raspberry … That does not make sense … 1GB RAM …

To get this work… you must install pico tts inside the openhab docker.

You must build custom image or the better way with cont-init.d Script

---

<div class="post-metadata">

**Author:** ![aditya\_Sharma](https://community.openhab.org/user_avatar/community.openhab.org/aditya_sharma/32/39400_2.png) [@aditya\_Sharma](https://community.openhab.org/u/aditya_Sharma)\
**Post date:** [September 19, 2019, 8:17am UTC](https://community.openhab.org/t/picotts-on-rpi-throws-an-error/82109/9 "2019-09-19T08:17:53Z")

</div>

Thanks a lot for the answer.

---

<div class="post-metadata">

**Author:** ![aditya\_Sharma](https://community.openhab.org/user_avatar/community.openhab.org/aditya_sharma/32/39400_2.png) [@aditya\_Sharma](https://community.openhab.org/u/aditya_Sharma)\
**Post date:** [September 19, 2019, 8:25am UTC](https://community.openhab.org/t/picotts-on-rpi-throws-an-error/82109/10 "2019-09-19T08:25:36Z")

</div>

> [@ei\_Gelb\_Geek](#):
>
> Docker on Raspberry … That does not make sense … 1GB RAM …

Yeah, surprizing works well. Initially tried this setup to get into openhab stuff. But since then I have found it making my life easy to manage things.

> [@ei\_Gelb\_Geek](#):
>
> the better way with cont-init.d Script

Thanks, I 'll try learning about that thing and maybe implement that soon.
