# Play mp3 sound from API response

**URL:** https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817
**Category:** Questions about Thunkable X
**Tags:** sound, webapi
**Created:** [December 18, 2022, 6:43am UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817 "2022-12-18T06:43:14Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [December 18, 2022, 6:43am UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/1 "2022-12-18T06:43:14Z")

</div>

I am using an API POST call and it’s returning an mp3 file. This works fine in Postman and plays the sound but not in Thunkable Live.

Can I just attach the green `response` block to the `play` block and have it play the sound? I’ve tried that and it’s not working and I’m not sure what else to try. I included the get object from JSON block and that didn’t work either.

This topic makes me think it’s probably not possible: [Download mp3 and play via Sound](https://community.thunkable.com/t/download-mp3-and-play-via-sound/1440164)

> [@Download mp3 and play via Sound](https://community.thunkable.com/t/download-mp3-and-play-via-sound/1440164):
>
> Hey, searched the forum one hour (and tried several hours before) is there a way to download mp3 files with GET request and play it via sound module? Because i need to create an app with dynamic content to use in region with and without internet thanks for your help

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [December 20, 2022, 5:44pm UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/2 "2022-12-20T17:44:29Z")

</div>

HUGE thanks to @ioannis for this since he figured out a fix.

The mp3 binary was tricky and I had been trying to get this to work using the base64 string that Google Cloud’s text-to-speech API returns but I hadn’t had any luck.

@ioannis used Any Component blocks to set the sound source and play the sound:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/9/8949b4a7c8694c1a85fbcb9df597df36303c5a4a.png)

Initially, those blocks looked like they were from a StP project but they aren’t; they are from DnD. Specifically, they are these two blocks:

 ![Screen Shot 2022-12-20 at 9.43.18 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/8/783d59209ebf81e83563fb860b86b3f7fcdab2b3.png)

It would be great to also figure out how to play the mp3 file. This method doesn’t seem to work for that whether I set the sound source to the green `response` block or `get object from JSON [response]`.

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [December 21, 2022, 12:47am UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/3 "2022-12-21T00:47:00Z")

</div>

You are welcome @tatiang

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [December 23, 2022, 7:28am UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/4 "2022-12-23T07:28:24Z")

</div>

@ioannis I’m curious if you know how to get the Sound1 component to show up in the Any Component blocks? I’m trying to set this up in a new project and when I add a “call” block or “set [component]” block as above, sound is not an option in either menu.

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [December 23, 2022, 10:24am UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/5 "2022-12-23T10:24:24Z")

</div>

Why do you want to use the “any component” block?

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [December 23, 2022, 5:50pm UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/6 "2022-12-23T17:50:29Z")

</div>

That was how I managed to use the Play and Stop blocks that work for base64 sounds. See my screenshot above for the Call and Set blocks I used. They have to be those because the normal Play and Stop blocks don’t work with base64.

And I was able to get those from the Any Component drawer before (which is how I assumed you created them, too) but now “Sound” isn’t an option in the menu for those blocks and I’m not sure how to add it.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [December 23, 2022, 6:29pm UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/7 "2022-12-23T18:29:15Z")

</div>

@ioannis Okay, I think the Set sound1’s source block was found by using a Set button’s Text block and changing the component to Sound1. I still don’t know how to add Sound1 as a component in a drag and drop project, though.

And then the Call block from Any Component just happened to have Sound as an option. I can’t seem to recreate this any more…

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [December 23, 2022, 6:45pm UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/8 "2022-12-23T18:45:18Z")

</div>

@tatiang Actually the way I did this was by first creating the project into Stap to Place and then transforming it into Drag and Drop. 😅

About your functionality, you don’t need to use the same blocks. You can make it also like that

 ![Στιγμιότυπο οθόνης (1469)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/3/835a055acf8c888dbc08bd88c6cce76c26b29179.png)

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [December 23, 2022, 6:46pm UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/9 "2022-12-23T18:46:49Z")

</div>

The standard play block has never worked for me for playing base64 sounds. 🙁

But you’re right, in a converted StP project that’s now DnD, I can add the sound blocks that work to play base64 sounds. In a standard DnD project, I can’t. That’s unfortunate.

I’m trying to re-create a project I already made but I started with a standard DnD project so I guess I need to go back and start with a converted StP project.

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [December 23, 2022, 6:53pm UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/10 "2022-12-23T18:53:34Z")

</div>

@tatiang If you want to add these blocks to your project, a workaround is to save the transformed page and then add it to the original project and copy-paste the blocks between the two screens

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [December 23, 2022, 6:56pm UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/11 "2022-12-23T18:56:16Z")

</div>

Can you say a little bit more about that? I know I can save a screen in StP but I don’t see a way to save a screen in DnD and I don’t see a way to load a saved screen in DnD.

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [December 23, 2022, 7:03pm UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/12 "2022-12-23T19:03:48Z")

</div>

![Στιγμιότυπο οθόνης (1471)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/7/17fe26d75ebdd4736bc63ecee87b4d6990cb68c2.png) ![Στιγμιότυπο οθόνης (1472)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/3/1360794f679af0059efeca898563949e786d8bcf.png)

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [December 23, 2022, 7:06pm UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/13 "2022-12-23T19:06:51Z")

</div>

Is that in DnD? This is what I see in DnD:

 ![Screen Shot 2022-12-23 at 11.05.47 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/1/21cdab8e7902e6372d80fde4ff7528168865da28.png) ![Screen Shot 2022-12-23 at 11.05.34 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/1/e135930e8e910d239af8102c11b14d604f260e86.png)

---

<div class="post-metadata">

### Author: ![yunggun](https://avatars.discourse-cdn.com/v4/letter/y/eb9ed0/32.png) [@yunggun](https://community.thunkable.com/u/yunggun)
#### Post date: [January 1, 2023, 12:12pm UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/14 "2023-01-01T12:12:27Z")

</div>

I don’t see an item for saved screens anywhere in my DND either.

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [January 3, 2023, 5:38pm UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/15 "2023-01-03T17:38:00Z")

</div>

I understand your frustration. At the moment, the option to save screens anywhere in DND and add them to DND projects is available to Business or Team Level Users.

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [January 3, 2023, 5:52pm UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/16 "2023-01-03T17:52:40Z")

</div>

This isn’t a workaround for the majority of your users though…

Is this a thing that in general Thunkable just can’t support?

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [January 4, 2023, 12:05pm UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/17 "2023-01-04T12:05:28Z")

</div>

If our sales and management team decide to make a change in our pricing and features structure, we will be sure to let you and all of our Thunkable community know.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [April 4, 2023, 12:05pm UTC](https://community.thunkable.com/t/play-mp3-sound-from-api-response/2183817/18 "2023-04-04T12:05:42Z")

</div>

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