Audio Recording using Sound blocks - help

I’d be loving this post but apparently I’m too free with my heart symbols! lol.

1 Like

Do you by any chance know where to find the MediaDB Upload Block? I can find a bunch of similar ones in the Files section of the D&D interface but not the MediaDB upload one mentioned in the documentation below for use with Cloudinary :frowning:

Media DB by Cloudinary - Thunkable Docs

I have the Cloudinary component almost working. I am into multiple projects so am not able to concentrate, hopefully today I will complete … sorry for the delay. When this is done I should be able to store all my voice recordings in the cloud as .mp3 and anybody out in the world using my app will have access to it.

Ooo I did it!

Here’s what I did for anyone who follows:

  1. Sign up to Cloudinary
  2. Get Cloudinary API keys etc. (setting in the top right of Cloudinary > Security > API Key and secret (scroll down to the bottom for these)
  3. Get Coudinary Account name (Cloudinary settings > Account > “Product environment cloud name:” (down the bottom)
  4. In Thunkable > Design > Settings (scroll to the bottom) add in Cloudinary data.
  5. In Thunkable > Blocks > Files > ‘upload any type of file from device’ block
  6. Drop block and make advanced
  7. Add your audio file into the file being uploaded (if your audio file is an app variable, say)
  8. Run that sucker

no error handling in there yet

Thunk3

2 Likes

My next issue is that I want to get OpenAI’s whisper to run transcription on this file but they seem to save to Cloudinary as webm format. Is this what thunkable saves as natively and is there a way to change that? Or is it a Cloudinary issue?

Look what popped up in my feed:

1 Like

@tatiang I am admittedly having a hard time getting playback to occur at all for any device. I even added a separate block to specifically stop recording.

There is an error in the console for playback when I test this in a web preview. I’ve had no luck getting it to play on Thunkable Live iOS or Android. The only nice thing in Android was that I could see the app accessing my microphone but still no playback at all.

We’ll get to checking things out internally to see what is happening. Thanks for flagging!

Yep, we’re going to see SO MUCH of this stuff coming over the next few months. It’s pretty cool that now Meta and Google are going to be playing catch-up and fighting hard for eyeballs. Hopefully, customers win for once.

Thanks for confirming!

:clap: :clap: :clap: Wow thanks Nathan you solved my problem!! I will test it out later and get back. Thanks again

Woop! You’re welcome. Happy to be able to help in return :slight_smile:

Here’s what I have now. I’m using WhisperAPI which runs the OpenAI Whisper model for transcription. Anyone else know why this returns a failed to transcribe error? I suspect it needs to be a POST request but neither POST nor GET work. I’m guessing that it’s because this is a webm format file but I’m struggling to find a way to convert it to wav / MP4. SO close.

1 Like

When I upload a timed recording to Cloudinary with these blocks, I get back a url that ends in .m4a:

image

Could the problem be when you assign the audio file block to a variable? I wouldn’t think that would do any conversion but maybe it does? Try it without that for now… just use the green audio file block itself for uploading.

Also make sure that you’re not initializing the variables to any values, even blank strings (“”). You don’t want a type initialized… you want the variables to auto-type. So just leave the “puzzle piece” empty for the initialize blocks. I can’t see if you’ve done that in your screenshot because it’s cut off.

1 Like

I have seen the mp3-m4a conversion and it really does not matter as m4a is only a kind of zip internally it is still mp3 and will play just fine. I really want to give a try to Nathan and your methodology of saving. 24 hours/day is too short … :slight_smile:

So… does that mean my suggestion worked? Or that you still need to find a way to convert from m4a/mp3 to wav/MP4? Are you able to generate m4a files using my method?

How strange!

Thunk6

Here’s what I’m getting in Cloudinary. What browser are you using? I’m on MS Edge maybe is related? I’ll try Chrome and report back.

I’m not just using initialise without even a blank pink piece attached but i’m also using the direct green audio file as you have there so I’m not even using an app variable to hold it now. Weird…

I’m using Chrome.

Yeh - tried in Chrome too. Same result.
Also tried removing anything which might be construed as operating on the green ‘audio file’ '“variable” e.g. making an app variable = to it. Still the same. Webm only.
Something to do with the way I have Cloudinary set up, maybe?

OK - I just rebuilt exactly what you did in a new app and I’m getting the same thing. Oddly, I’m getting a url which is a video - which might explain why the format is webm: http://res.cloudinary.com/thunkablecloudinary123/video/upload/v1674682215/qwrjaki1elpzatau7wrn.webm

Here’s exactly what I’m running now:

Can you share the project with me (here or in a private message if you prefer)? Maybe it’s the device… I’m using an iPhone 13 Pro. Are you testing on an Android phone?

Right now - I’m actually just testing on my laptop. Maybe that’s the issue? I haven’t graduated to testing on device yet. Using a free plan to get started and I think you can only deploy like twice a month on that, right?