# Getting Mathematica, R.Pi, and Pico TTS to speak to me

**URL:** <https://community.wolfram.com/t/getting-mathematica-r-pi-and-pico-tts-to-speak-to-me/4992>\
**Category:** Questions\
**Tags:** wolfram-alpha, raspberry-pi\
**Created:** [March 1, 2015, 7:41pm UTC](https://community.wolfram.com/t/getting-mathematica-r-pi-and-pico-tts-to-speak-to-me/4992 "2015-03-01T19:41:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![scottdpickering](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@scottdpickering](https://community.wolfram.com/u/scottdpickering)\
**Post date:** [March 1, 2015, 7:41pm UTC](https://community.wolfram.com/t/getting-mathematica-r-pi-and-pico-tts-to-speak-to-me/4992/1 "2015-03-01T19:41:09Z")

</div>

Hi,  
I’m currently in the process of trying to get my Raspberry Pi to speak to me.

So far I have the Pico TTS engine installed. I plan to further this to be able to speak results from wolfram alpha searches using the speak[] function. However, when I type a command (e.g. Speak[WolframAlpha[“The dark knight”]]), it fails because “a front end is not available”.

Please could someone explain what this means and how to go about resolving it? Also, when speaking, will Pico TTS be used for the speech synthesis?  
Thanks 🙂

---

<div class="post-metadata">

**Author:** ![bobthechemist](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/bobthechemist/32/4054_2.png) [@bobthechemist](https://community.wolfram.com/u/bobthechemist)\
**Post date:** [March 3, 2015, 3:20am UTC](https://community.wolfram.com/t/getting-mathematica-r-pi-and-pico-tts-to-speak-to-me/4992/2 "2015-03-03T03:20:08Z")

</div>

The “a front end is not available” error typically occurs when you try to run a command that requires the graphical user interface. Are you calling `mathematica` or `wolfram`? You need the former.

Are you asking M to speak the words “The dark knight” or the output of `WolframAlpha["The Dark Knight"]`? I suspect you don’t want the latter; however your function runs as expected in my RPi.

Never used Pico TTS so can’t say anything about it.

---

<div class="post-metadata">

**Author:** ![iliang](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/iliang/32/11263_2.png) [@iliang](https://community.wolfram.com/u/iliang)\
**Post date:** [March 4, 2015, 6:46am UTC](https://community.wolfram.com/t/getting-mathematica-r-pi-and-pico-tts-to-speak-to-me/4992/3 "2015-03-04T06:46:32Z")

</div>

From a standalone kernel, try [UsingFrontEnd](http://reference.wolfram.com/language/ref/UsingFrontEnd.html). It requires X server access, so DISPLAY should be set, for example

```
pi@testpi2lx ~ $ export DISPLAY=:0
pi@testpi2lx ~ $ wolfram 2>/dev/null
Wolfram Language (Raspberry Pi Pilot Release)
Copyright 1988-2015 Wolfram Research 
Information & help: wolfram.com/raspi

In[1]:= UsingFrontEnd[Speak["Hello"]]

```

Mathematica uses eSpeak for TTS.

---

<div class="post-metadata">

**Author:** ![scottdpickering](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@scottdpickering](https://community.wolfram.com/u/scottdpickering)\
**Post date:** [March 4, 2015, 7:32am UTC](https://community.wolfram.com/t/getting-mathematica-r-pi-and-pico-tts-to-speak-to-me/4992/4 "2015-03-04T07:32:08Z")

</div>

Ok, thanks for your help. I’ll have to see if there’s a way of using a different tts as espeak is very robotic. I’m calling the command from RPi’s wolfram program at the minute so I’ll look at mathematica.
