isaacgv
/
cog-whisper-v2
- Public
- 23 runs
Run isaacgv/cog-whisper-v2 with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
Field | Type | Default value | Description |
---|---|---|---|
audio |
string
|
Audio file
|
|
model |
string
(enum)
|
large-v2
Options: large-v2 |
Choose a Whisper model.
|
transcription |
string
(enum)
|
plain text
Options: plain text, srt, vtt |
Choose the format for the transcription
|
translate |
boolean
|
False
|
Translate the text to English when set to True
|
language |
string
(enum)
|
Options: af, am, ar, as, az, ba, be, bg, bn, bo, br, bs, ca, cs, cy, da, de, el, en, es, et, eu, fa, fi, fo, fr, gl, gu, ha, haw, he, hi, hr, ht, hu, hy, id, is, it, ja, jw, ka, kk, km, kn, ko, la, lb, ln, lo, lt, lv, mg, mi, mk, ml, mn, mr, ms, mt, my, ne, nl, nn, no, oc, pa, pl, ps, pt, ro, ru, sa, sd, si, sk, sl, sn, so, sq, sr, su, sv, sw, ta, te, tg, th, tk, tl, tr, tt, uk, ur, uz, vi, yi, yo, zh, Afrikaans, Albanian, Amharic, Arabic, Armenian, Assamese, Azerbaijani, Bashkir, Basque, Belarusian, Bengali, Bosnian, Breton, Bulgarian, Burmese, Castilian, Catalan, Chinese, Croatian, Czech, Danish, Dutch, English, Estonian, Faroese, Finnish, Flemish, French, Galician, Georgian, German, Greek, Gujarati, Haitian, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hungarian, Icelandic, Indonesian, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Korean, Lao, Latin, Latvian, Letzeburgesch, Lingala, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Moldavian, Moldovan, Mongolian, Myanmar, Nepali, Norwegian, Nynorsk, Occitan, Panjabi, Pashto, Persian, Polish, Portuguese, Punjabi, Pushto, Romanian, Russian, Sanskrit, Serbian, Shona, Sindhi, Sinhala, Sinhalese, Slovak, Slovenian, Somali, Spanish, Sundanese, Swahili, Swedish, Tagalog, Tajik, Tamil, Tatar, Telugu, Thai, Tibetan, Turkish, Turkmen, Ukrainian, Urdu, Uzbek, Valencian, Vietnamese, Welsh, Yiddish, Yoruba |
language spoken in the audio, specify None to perform language detection
|
temperature |
number
|
0
|
temperature to use for sampling
|
patience |
number
|
optional patience value to use in beam decoding, as in https://arxiv.org/abs/2204.05424, the default (1.0) is equivalent to conventional beam search
|
|
suppress_tokens |
string
|
-1
|
comma-separated list of token ids to suppress during sampling; '-1' will suppress most special characters except common punctuations
|
initial_prompt |
string
|
optional text to provide as a prompt for the first window.
|
|
condition_on_previous_text |
boolean
|
True
|
if True, provide the previous output of the model as a prompt for the next window; disabling may make the text inconsistent across windows, but the model becomes less prone to getting stuck in a failure loop
|
temperature_increment_on_fallback |
number
|
0.2
|
temperature to increase when falling back when the decoding fails to meet either of the thresholds below
|
compression_ratio_threshold |
number
|
2.4
|
if the gzip compression ratio is higher than this value, treat the decoding as failed
|
logprob_threshold |
number
|
-1
|
if the average log probability is lower than this value, treat the decoding as failed
|
no_speech_threshold |
number
|
0.6
|
if the probability of the <|nospeech|> token is higher than this value AND the decoding has failed due to `logprob_threshold`, consider the segment as silence
|
word_timestamps |
boolean
|
True
|
Improves the accuracy of the timestamps by using word-level timestamps
|
{
"type": "object",
"title": "Input",
"required": [
"audio"
],
"properties": {
"audio": {
"type": "string",
"title": "Audio",
"x-order": 0,
"description": "Audio file"
},
"model": {
"enum": [
"large-v2"
],
"type": "string",
"title": "model",
"description": "Choose a Whisper model.",
"default": "large-v2",
"x-order": 1
},
"language": {
"enum": [
"af",
"am",
"ar",
"as",
"az",
"ba",
"be",
"bg",
"bn",
"bo",
"br",
"bs",
"ca",
"cs",
"cy",
"da",
"de",
"el",
"en",
"es",
"et",
"eu",
"fa",
"fi",
"fo",
"fr",
"gl",
"gu",
"ha",
"haw",
"he",
"hi",
"hr",
"ht",
"hu",
"hy",
"id",
"is",
"it",
"ja",
"jw",
"ka",
"kk",
"km",
"kn",
"ko",
"la",
"lb",
"ln",
"lo",
"lt",
"lv",
"mg",
"mi",
"mk",
"ml",
"mn",
"mr",
"ms",
"mt",
"my",
"ne",
"nl",
"nn",
"no",
"oc",
"pa",
"pl",
"ps",
"pt",
"ro",
"ru",
"sa",
"sd",
"si",
"sk",
"sl",
"sn",
"so",
"sq",
"sr",
"su",
"sv",
"sw",
"ta",
"te",
"tg",
"th",
"tk",
"tl",
"tr",
"tt",
"uk",
"ur",
"uz",
"vi",
"yi",
"yo",
"zh",
"Afrikaans",
"Albanian",
"Amharic",
"Arabic",
"Armenian",
"Assamese",
"Azerbaijani",
"Bashkir",
"Basque",
"Belarusian",
"Bengali",
"Bosnian",
"Breton",
"Bulgarian",
"Burmese",
"Castilian",
"Catalan",
"Chinese",
"Croatian",
"Czech",
"Danish",
"Dutch",
"English",
"Estonian",
"Faroese",
"Finnish",
"Flemish",
"French",
"Galician",
"Georgian",
"German",
"Greek",
"Gujarati",
"Haitian",
"Haitian Creole",
"Hausa",
"Hawaiian",
"Hebrew",
"Hindi",
"Hungarian",
"Icelandic",
"Indonesian",
"Italian",
"Japanese",
"Javanese",
"Kannada",
"Kazakh",
"Khmer",
"Korean",
"Lao",
"Latin",
"Latvian",
"Letzeburgesch",
"Lingala",
"Lithuanian",
"Luxembourgish",
"Macedonian",
"Malagasy",
"Malay",
"Malayalam",
"Maltese",
"Maori",
"Marathi",
"Moldavian",
"Moldovan",
"Mongolian",
"Myanmar",
"Nepali",
"Norwegian",
"Nynorsk",
"Occitan",
"Panjabi",
"Pashto",
"Persian",
"Polish",
"Portuguese",
"Punjabi",
"Pushto",
"Romanian",
"Russian",
"Sanskrit",
"Serbian",
"Shona",
"Sindhi",
"Sinhala",
"Sinhalese",
"Slovak",
"Slovenian",
"Somali",
"Spanish",
"Sundanese",
"Swahili",
"Swedish",
"Tagalog",
"Tajik",
"Tamil",
"Tatar",
"Telugu",
"Thai",
"Tibetan",
"Turkish",
"Turkmen",
"Ukrainian",
"Urdu",
"Uzbek",
"Valencian",
"Vietnamese",
"Welsh",
"Yiddish",
"Yoruba"
],
"type": "string",
"title": "language",
"description": "language spoken in the audio, specify None to perform language detection",
"x-order": 4
},
"patience": {
"type": "number",
"title": "Patience",
"x-order": 6,
"description": "optional patience value to use in beam decoding, as in https://arxiv.org/abs/2204.05424, the default (1.0) is equivalent to conventional beam search"
},
"translate": {
"type": "boolean",
"title": "Translate",
"default": false,
"x-order": 3,
"description": "Translate the text to English when set to True"
},
"temperature": {
"type": "number",
"title": "Temperature",
"default": 0,
"x-order": 5,
"description": "temperature to use for sampling"
},
"transcription": {
"enum": [
"plain text",
"srt",
"vtt"
],
"type": "string",
"title": "transcription",
"description": "Choose the format for the transcription",
"default": "plain text",
"x-order": 2
},
"initial_prompt": {
"type": "string",
"title": "Initial Prompt",
"x-order": 8,
"description": "optional text to provide as a prompt for the first window."
},
"suppress_tokens": {
"type": "string",
"title": "Suppress Tokens",
"default": "-1",
"x-order": 7,
"description": "comma-separated list of token ids to suppress during sampling; '-1' will suppress most special characters except common punctuations"
},
"word_timestamps": {
"type": "boolean",
"title": "Word Timestamps",
"default": true,
"x-order": 14,
"description": "Improves the accuracy of the timestamps by using word-level timestamps"
},
"logprob_threshold": {
"type": "number",
"title": "Logprob Threshold",
"default": -1,
"x-order": 12,
"description": "if the average log probability is lower than this value, treat the decoding as failed"
},
"no_speech_threshold": {
"type": "number",
"title": "No Speech Threshold",
"default": 0.6,
"x-order": 13,
"description": "if the probability of the <|nospeech|> token is higher than this value AND the decoding has failed due to `logprob_threshold`, consider the segment as silence"
},
"condition_on_previous_text": {
"type": "boolean",
"title": "Condition On Previous Text",
"default": true,
"x-order": 9,
"description": "if True, provide the previous output of the model as a prompt for the next window; disabling may make the text inconsistent across windows, but the model becomes less prone to getting stuck in a failure loop"
},
"compression_ratio_threshold": {
"type": "number",
"title": "Compression Ratio Threshold",
"default": 2.4,
"x-order": 11,
"description": "if the gzip compression ratio is higher than this value, treat the decoding as failed"
},
"temperature_increment_on_fallback": {
"type": "number",
"title": "Temperature Increment On Fallback",
"default": 0.2,
"x-order": 10,
"description": "temperature to increase when falling back when the decoding fails to meet either of the thresholds below"
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
{
"type": "object",
"title": "ModelOutput",
"required": [
"detected_language",
"transcription"
],
"properties": {
"segments": {
"title": "Segments"
},
"srt_file": {
"type": "string",
"title": "Srt File",
"format": "uri"
},
"txt_file": {
"type": "string",
"title": "Txt File",
"format": "uri"
},
"translation": {
"type": "string",
"title": "Translation"
},
"transcription": {
"type": "string",
"title": "Transcription"
},
"detected_language": {
"type": "string",
"title": "Detected Language"
}
}
}