Generating a readable transcript from JSON output

So I am using a transcription service to translate an uploaded video file to text. The problem is that the transcription service outputs all data as a JSON list formatted like below with each word being another entry in an array.

I believe I will have to create some custom code to format this output into diarized speech but if someone can point me in the right direction to get started that would be appreciated. I’m confident that this problem isn’t that difficult I’m just not sure how to approach it. Thank you for your help.

Link to API doc? I don’t see any issue with your JSON. this is readable by Bubble without any issue. What is your goal?

Here is the link to the API docs of the service I’m using: Retrieve Transcript
I’m using Assembly AI for the speech to text and it is outputting with word level time stamps: Word-level timestamps | AssemblyAI | Documentation

My goal is to take this output (a different picture shown below) and format into a nice looking diarized transcript in a repeating group.

Yes. Set your RG to type “Get Transcript words” that is the list,
Set data source to Get Data from API, and call this api, and select 's words

After that, set your RG like you want using Current cell words’s (text, language, confidence…)

Ok that works as a quick and dirty way to get it to display. What I really want is to somehow store the properly formatted transcript in a text field. Do you know anything about formatting the JSON to text in the back end on Bubble?

Why do you want to save it? What do you want to save exactly and why do you say that works as a quick and dirty way to display?

I said it was a quick and dirty way because it didn’t save the formatted text to my bubble database, but it is a great solution and it’s amazing you were able to fix part of my issue so quickly! Thank you for your help! Please accept my apology if you interpreted it negatively.

I want to save it so that I can pass the transcript to another AI to ask it questions and produce reports about the interaction.

So in this case, you will need to schedule workflow on a list.
Create a backend WF that will contain fields from the payload you need (example: text, start, end, language, confidence) (be sure to set the correct type for each in both API Connector and backend WF
In this workflow Create a new thing in the DB you want and assign each field set to correct field in DB
Schedule a backend WF on a list by selecting the same type as the RG and the same Data source. For each field, use This’s words … to select the correct key to assign.

That’s all.
But… Do you really need to save it to DB to sent it to another API call? If not, instead of create a new thing in backend WF, you can call another API directly from the backend WF. After that, I don’t know what you want to do with result…

Ok that works! Thank you for your help - I thought I was going to have to write some custom code to overcome this challenge. But back end workflows should work.

1 Like

I forget another option
Create a bulk create request to Bubble Data API

The body will be set using the Get data API again, with :format as text on the list of words. This will let you set the payload correctly for each item

You could use a Trigger workflow (also in backend tab) to call another API once item is created…