drachtio / drachtio-freeswitch-modules

A collection of open-sourced freeswitch modules that I use in various drachtio applications
MIT License
176 stars 119 forks source link

How to know the duration of stream listen by mod_google_transcribe #57

Open PaulNewtech opened 3 years ago

PaulNewtech commented 3 years ago

Google is billing the STT measured in increments rounded up to 15 seconds. It could be useful to verify the time that Google is billing. In order to do that, one option would be to return the duration of the file transcribed by google in the JSON body of the event. Is it a feature that is planned in a feature released?

davehorton commented 3 years ago

hmm, interesting thought. I don't get any info from google itself but I guess I could clock the number of seconds of audio sent and return it in the transcription event. I'm not so sure that would match up with google's billing though, because for instance if we send audio that is not transcribed we may not get a transcription event at all. There may be other cases like that as well.

PaulNewtech commented 3 years ago

I see ! Maybe returning a new event with the duration that is send to google - decorrelated with the actual event - would be an option ?