# Create dynamic urls for TTS

**URL:** <https://discourse.nodered.org/t/create-dynamic-urls-for-tts/2763>\
**Category:** General\
**Created:** [2 September 2018 06:29 UTC](https://discourse.nodered.org/t/create-dynamic-urls-for-tts/2763 "2018-09-02T06:29:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nodecentral](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodecentral/32/10432_2.png) [@nodecentral](https://discourse.nodered.org/u/nodecentral)\
**Post date:** [2 September 2018 06:29 UTC](https://discourse.nodered.org/t/create-dynamic-urls-for-tts/2763/1 "2018-09-02T06:29:26Z")

</div>

Hi

I have a TTS set up at home where I can send formatted URLs to be spoken out via my Sonos set up (via a Sonos-http engine, with an Amazon Polly speech config).

The URLs that need to be created are like the following

1. To play across all zones, (sayall) stipulating a person’s voice (Geraint) and the required volume (70) is this - with encoded text

[http://192.168.1.134:5005/sayall/John,%20and%20Ben.%20this%20is%20your%204%20minute%20warning/Geraint/70](http://192.168.1.134:5005/sayall/John,%20and%20Ben.%20this%20is%20your%204%20minute%20warning/Geraint/70)

1. To play In just one room , (kitchen) stipulating a different person’s voice this time (Kendra) and the required volume (60) it’s this.

[http://192.168.1.134:5005/kitchen/say/Testing%20one%20,%20two%20,%20three./Kendra/60](http://192.168.1.134:5005/kitchen/say/Testing%20one%20,%20two%20,%20three./Kendra/60)

There are subtle differences in the URLs that can be sent but if someone has time - I’d appreciate any help/advice to create a dashboard driven flow that can create any variation of URL to be called

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [2 September 2018 13:09 UTC](https://discourse.nodered.org/t/create-dynamic-urls-for-tts/2763/2 "2018-09-02T13:09:45Z")

</div>

So do you have the UI set up for the required parameters?

- place
- text
- voice
- volume

If not, that is the place to start. Place presumably a drop-down selector, text would be a textarea, voice another drop-down and volume either a text field, a number field with +/- buttons or a slider.

Send those back to Node-RED. Validate and sanitise the data - especially url-encode the text. Then pass into a template node (not a Dashboard template node) to put together the URL. Then pass to the http request node.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [2 September 2018 14:34 UTC](https://discourse.nodered.org/t/create-dynamic-urls-for-tts/2763/3 "2018-09-02T14:34:45Z")

</div>

The cookbook has an example that shows how to use URL parameters when configuring your HTTP In node to give more flexibility in what it accepts.

[https://cookbook.nodered.org/http/handle-url-parameters](https://cookbook.nodered.org/http/handle-url-parameters)
