Deployment
#655
Replies: 1 comment 8 replies
-
@20May1997, hello. You can try sending your audio file in the flask request files, then call the model to execute this file. @app.route("/transcribe", methods=["POST"])
def transcribe():
input_file = flask.request.files.get("input")
try:
segments, info = model.transcribe(input_file)
segments = list(segments)
response = {
"transcription": "".join(segment.text for segment in segments),
"language": info.language,
"duration": info.duration,
}
return response
except Exception as e:
return message("Internal error: %s" % e, 500) Hope it will be useful for you. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Can anybody tell me how can i run deplay this model using flask api I am fetching the audio file from a url path. but unable to handle the audio file
Beta Was this translation helpful? Give feedback.
All reactions