Skip to content

A method to retrieve finished transcripts via request_ids after call backs? #162

Closed Answered by jcdyer
jaxomlotus asked this question in General help
Discussion options

You must be logged in to vote

@jaxomlotus :

This works as a proof of concept lambda:

Whenever an audio file is uploaded to AUDIO_BUCKET, a deepgram request is made with a presigned url pointing to that object, and a PUT callback pointing to a matching filename in the TRANSCRIPT_BUCKET.

import boto3
import json
import os
from base64 import b64decode
from urllib.request import Request, urlopen
from urllib.parse import urlencode

DEEPGRAM_API_KEY = os.environ.get("DEEPGRAM_API_KEY")
AUDIO_BUCKET = os.environ["AUDIO_BUCKET"]
TRANSCRIPT_BUCKET = os.environ["TRANSCRIPT_BUCKET"]

def lambda_handler(event, context):
    if not DEEPGRAM_API_KEY:
        return {
            "statusCode": 401,
            "body": "no DEEPGRAM_A…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@jcdyer
Comment options

jcdyer May 26, 2023
Collaborator

@jcdyer
Comment options

jcdyer May 27, 2023
Collaborator

Answer selected by jpvajda
@jcdyer
Comment options

jcdyer May 27, 2023
Collaborator

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants