Closed lox closed 1 year ago
Happy to provide example files if that helps!
Thanks Lox. Just to check, does file.createReadStream()
return a stream object or a promise? You may have to await file.createReadStream()
It's a stream, as requested by the SDK. It would be up to the SDK to call await, right?
This works fine with webm files, or m4a files with the metadata at the start, so it's absolutely working in some cases.
It's a stream, as requested by the SDK. It would be up to the SDK to call await, right?
Yeh we just need a Readable
. I needed to ask because I've never used the gcloud node SDK.
If you want to share a link to the audio here you can, but if you'd rather keep it private you can share to me in our Discord https://dpgr.am/discord
Yeah, apologies it's a very reasonable question! There must be something about the gcloud implementation that is causing the issue, I thought I'd raise it in case there is something in how the stream is handled on the deepgram side.
Yeah, apologies it's a very reasonable question! There must be something about the gcloud implementation that is causing the issue, I thought I'd raise it in case there is something in how the stream is handled on the deepgram side.
Yeh indeed, and happy to try and help. If you could share the file, i'll see what I can recommend. It seems that the metadata at the end of file has been known to be an issue before. I've asked for a general way to normalize this in the meantime, i'll let you know what I hear.
Closing this issue as it is likely an issue with our API and not the SDK.
We're interested in helping resolve it. So if you're still trying to resolve, please email the file on through to devrel@deepgram.com
What is the current behavior?
Calling deepgram.transcription.preRecorded with a ReadStream fails with MP4 files with metadata headers at the end of the file, but only when streamed from a remote source (google storage) vs local filesystem.
I get:
Steps to reproduce
Expected behavior
It should work. This isn't actually being streamed, the API endpoint should only start processing when it gets the whole stream.
Please tell us about your environment
Other information