spladder87/kblab-whisper-diarization
Run spladder87/kblab-whisper-diarization 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 |
|---|---|---|---|
| enable_diarization |
boolean
|
True
|
Perform speaker diarization? (Requires Hugging Face token)
|
| hf_token |
string
|
Your Hugging Face API token. Leave blank to use the default set in the environment.
|
|
| file_string |
string
|
Either provide: Base64 encoded audio file,
|
|
| file_url |
string
|
Or provide: A direct audio file URL
|
|
| file |
string
|
Or an audio file
|
|
| num_speakers |
integer
|
Min: 1 Max: 50 |
Number of speakers, leave empty to autodetect.
|
| translate |
boolean
|
False
|
Translate the speech into English.
|
| language |
string
|
Language of the spoken words as a language code like 'en'. Leave empty to auto-detect language.
|
|
| prompt |
string
|
Vocabulary: provide names, acronyms and loanwords in a list. Use punctuation for best accuracy.
|
{
"type": "object",
"title": "Input",
"properties": {
"file": {
"type": "string",
"title": "File",
"format": "uri",
"x-order": 4,
"description": "Or an audio file"
},
"prompt": {
"type": "string",
"title": "Prompt",
"x-order": 8,
"description": "Vocabulary: provide names, acronyms and loanwords in a list. Use punctuation for best accuracy."
},
"file_url": {
"type": "string",
"title": "File Url",
"x-order": 3,
"description": "Or provide: A direct audio file URL"
},
"hf_token": {
"type": "string",
"title": "Hf Token",
"x-order": 1,
"description": "Your Hugging Face API token. Leave blank to use the default set in the environment."
},
"language": {
"type": "string",
"title": "Language",
"x-order": 7,
"description": "Language of the spoken words as a language code like 'en'. Leave empty to auto-detect language."
},
"translate": {
"type": "boolean",
"title": "Translate",
"default": false,
"x-order": 6,
"description": "Translate the speech into English."
},
"file_string": {
"type": "string",
"title": "File String",
"x-order": 2,
"description": "Either provide: Base64 encoded audio file,"
},
"num_speakers": {
"type": "integer",
"title": "Num Speakers",
"maximum": 50,
"minimum": 1,
"x-order": 5,
"description": "Number of speakers, leave empty to autodetect."
},
"enable_diarization": {
"type": "boolean",
"title": "Enable Diarization",
"default": true,
"x-order": 0,
"description": "Perform speaker diarization? (Requires Hugging Face token)"
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
Schema
{
"type": "object",
"title": "Output",
"required": [
"segments"
],
"properties": {
"language": {
"type": "string",
"title": "Language"
},
"segments": {
"type": "array",
"items": {},
"title": "Segments"
},
"num_speakers": {
"type": "integer",
"title": "Num Speakers"
}
}
}