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.
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:
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].
@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.
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.
@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…
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.
@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
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.
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.
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.