jianfch / stable-ts

Transcription, forced alignment, and audio indexing with OpenAI's Whisper
MIT License
1.59k stars 176 forks source link

Return the result as JSON instead of file #300

Closed teddykishi closed 10 months ago

teddykishi commented 10 months ago

Hi thank you for tour awesome job. I would like to know if it is possible for you to explain me how to return the JSON instead of saving it into a file. It needs to be a response for an API.

Thanks

teddykishi commented 10 months ago

I got my answer i just needed to do return jsonify(result.to_dict())