Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for openai/whisper-large-v3-turbo model. #3630

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,14 @@
"source": [
"# @title Deploy\n",
"\n",
"# This section deploys the prebuilt whisper large v3 model on a Vertex endpoint\n",
"# @markdown This section deploys the prebuilt whisper large v3 model on a Vertex endpoint\n",
"# @markdown Set the accelerator type to use for deployment. It takes 15 minutes to deploy this model.\n",
"\n",
"model_id = \"openai/whisper-large-v3\"\n",
"model_id = \"openai/whisper-large-v3-turbo\" # @param [\"openai/whisper-large-v3\", \"openai/whisper-large-v3-turbo\"]\n",
"task = \"audio2text\"\n",
"model_name = \"whisper_large_v3\"\n",
"if model_id == \"whisper-large-v3-turbo\":\n",
" model_name = \"whisper_large_v3_turbo\"\n",
"\n",
"accelerator_type = \"NVIDIA_L4\" # @param [\"NVIDIA_L4\", \"NVIDIA_A100_80GB\"]\n",
"accelerator_count = 1\n",
Expand Down Expand Up @@ -267,10 +270,15 @@
"# @title Predict\n",
"\n",
"# @markdown This section is only for sending predictions to deployed endpoint.\n",
"# @markdown You can provide comma separated gcs URIs as input.\n",
"# @markdown Make sure that the service account associated with deployment has storage.buckets.get and storage.objects.get. See [GCS Access](https://cloud.google.com/storage/docs/access-control/using-iam-permissions)\n",
"# @markdown You can change output language. If the audio is in english and language is set to french then output will be translated to french.\n",
"# @markdown If language is not provided then output language will be automatically detected.\n",
"# @markdown You can set timestamp value so that the timestamp is added to the transcribed text at sentence or text level.\n",
"\n",
"gcs_uris_comma_separated = \"gs://cloud-samples-tests/speech/Google_Gnome.wav,gs://cloud-samples-tests/speech/commercial.wav\" # @param {type: \"string\"}\n",
"language = \"\" # @param {\"type\":\"string\",\"placeholder\":\"output language to translate\"}\n",
"timestamp = \"word\" # @param [\"\", \"word\", \"sentence\"]\n",
"timestamp = \"\" # @param [\"\", \"word\", \"sentence\"]\n",
"\n",
"parameters = {\n",
" \"language\": language,\n",
Expand Down