#In Faster Whisper Serverless, how to get transcribe result?

13 messages · Page 1 of 1 (latest)

deft mango
#

In python code, I sent request :

   # S3 bucket and key for the audio file
    s3 = boto3.client('s3')
    # RunPog API configuration

    presigned_url = s3.generate_presigned_url(
        'get_object',
        Params={'Bucket': BUCKET_NAME, 'Key': av_path},
        ExpiresIn=3600  # valid for 1 hour
    )

    print(presigned_url)

    payload = {
        "input": {
            "audio_base64": presigned_url,
            "model": "large-v3",
            "language": "en",
            "beam_size": 5,
            "vad_filter": True
        }
    }

    headers = {
        "Authorization": f"Bearer {RUNPOD_API_KEY}",
        "Content-Type": "application/json"
    }

    start_time = time.time()
    response = requests.post(
        f"https://api.runpod.ai/v2/{ENDPOINT_ID}/run",
        json=payload,
        headers=headers
    )
    job = response.json()
    print(f"Response data: {job}")
    job_id = job.get("id")
    print(f"Submitted job: {job_id}")

    # Step 2: Poll until complete
    status_url = f"https://api.runpod.ai/v2/{ENDPOINT_ID}/status/{job_id}"
    while True:
        time.sleep(3)
        status_response = requests.get(status_url, headers=headers)
        status = status_response.json()
        if status["status"] == "COMPLETED":
            break
        elif status["status"] == "FAILED":
            raise Exception("Transcription job failed.")
        else:
            print(f"Job status: {status}")
#            print(f"Job status: {status['status']}")  

I am always get status data:

Status:  {'delayTime': 1164, 'executionTime': 40, 'id': '2db7b7e9-707d-4e52-86c7-4313c968dec5-e1', 'status': 'COMPLETED', 'workerId': 'r1de9b8p7btmh1'}

There is no transcript data. How to get it? I don't see any document. Please help!

winter spindleBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

vast cape
#

maybe your code is wrong

#

audio_base64 change to "audio" only

#

i meant change this one

payload = {
        "input": {
            "audio_base64": presigned_url,
            "model": "large-v3",
            "language": "en",
            "beam_size": 5,
            "vad_filter": True
        }
    }
#

into ```
payload = {
"input": {
"audio": presigned_url,
"model": "large-v3",
"language": "en",
"beam_size": 5,
"vad_filter": True
}
}

deft mango
#

I have updated the 'payload' data structure as your comments but problem does not resolve. When I check the Logs in runpod console. I see error:

[error]Failed to return job results. | 400, message='Bad Request', url=URL('https://api.runpod.ai/v2/xxxxxxxxxxxxxxxx/job-done/tv0vh9lisnxwjd/9fb5bf97-1f19-4d4b-a759-fc2ca2dac1a7-e1?gpu=NVIDIA+L4&isStream=false')

This error is the same as my previous test.

deft mango
#

Please see full logs for this job:

tv0vh9lisnxwjd[info]Finished.
tv0vh9lisnxwjd[error]Failed to return job results. | 400, message='Bad Request', url=URL('https://api.runpod.ai/v2/xxxxxxxxxxxxxxx/job-done/tv0vh9lisnxwjd/9fb5bf97-1f19-4d4b-a759-fc2ca2dac1a7-e1?gpu=NVIDIA+L4&isStream=false')
tv0vh9lisnxwjd[info]Started.
tv0vh9lisnxwjd[info]--- Starting Serverless Worker |  Version 1.5.2 ---\n
tv0vh9lisnxwjd[info]\n
tv0vh9lisnxwjd[info]A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.\n
tv0vh9lisnxwjd[info]\n
tv0vh9lisnxwjd[info]https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license\n
tv0vh9lisnxwjd[info]By pulling and using the container, you accept the terms and conditions of this license:\n
tv0vh9lisnxwjd[info]This container image and its contents are governed by the NVIDIA Deep Learning Container License.\n
tv0vh9lisnxwjd[info]\n
tv0vh9lisnxwjd[info]Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n
tv0vh9lisnxwjd[info]\n
tv0vh9lisnxwjd[info]CUDA Version 11.7.1\n
tv0vh9lisnxwjd[info]\n
tv0vh9lisnxwjd[info]==========\n
tv0vh9lisnxwjd[info]== CUDA ==\n
tv0vh9lisnxwjd[info]==========\n
tv0vh9lisnxwjd[info]\n
vast cape
#

SO apparently

#

the vad_filter wasnt correct too

#

it should be enable_vad

#

and should be True or False