# \[Solved\]Adding quotes around an exec node parameter

**URL:** <https://discourse.nodered.org/t/solved-adding-quotes-around-an-exec-node-parameter/53008>\
**Category:** General\
**Created:** [31 October 2021 11:47 UTC](https://discourse.nodered.org/t/solved-adding-quotes-around-an-exec-node-parameter/53008 "2021-10-31T11:47:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [31 October 2021 11:47 UTC](https://discourse.nodered.org/t/solved-adding-quotes-around-an-exec-node-parameter/53008/1 "2021-10-31T11:47:06Z")

</div>

I'm wanting to try and use espeak on a Pi for text to speech but having a problem in passing my text with quotes around it

If you just use (from a command line)  
`espeak alexa, what is the time`

then it only says alexa  
but works fine with  
`espeak "alexa, what is the time"`

I can't work out how to add quotes around my phrase when using the exec node to do the work from within Node-RED

_I send text to exec running espeak which saves it as a file and then use aplay to hear the file_

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/c/8c780f60e61db9c72815fed8a0273083350ddecb.png)

I can do it with a function node

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/b/8b77a57e04e3c4381d4710603d7c8f9e8d30e50c.png)

but I'm wondering if there's a non-function node method instead?  
PS you need to  
`sudo apt-get install espeak`  
if you want to play with this

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [31 October 2021 12:22 UTC](https://discourse.nodered.org/t/solved-adding-quotes-around-an-exec-node-parameter/53008/2 "2021-10-31T12:22:29Z")

</div>

I've remembered about the template node 🙂  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/a/8aebf3f8bdf53aa891f707d74467e8c1c4fe6e64.png)

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [31 October 2021 12:28 UTC](https://discourse.nodered.org/t/solved-adding-quotes-around-an-exec-node-parameter/53008/3 "2021-10-31T12:28:39Z")

</div>

Doesn't it work if the exec command is espeak + any flags and you append the payload alexa, what is the time? (I don't have an alexa or espeak, but that works with **echo -n** )

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [31 October 2021 12:32 UTC](https://discourse.nodered.org/t/solved-adding-quotes-around-an-exec-node-parameter/53008/4 "2021-10-31T12:32:24Z")

</div>

No - it doesn't work just appending the payload as the payload needs to have quotes around it

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [14 November 2021 12:32 UTC](https://discourse.nodered.org/t/solved-adding-quotes-around-an-exec-node-parameter/53008/5 "2021-11-14T12:32:26Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
