Careless whisper (#6877)
Co-authored-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -190,7 +190,7 @@ export type DetectProviderResponse = {
|
||||
provider_name: string;
|
||||
};
|
||||
|
||||
export type DictationProvider = 'openai' | 'elevenlabs';
|
||||
export type DictationProvider = 'openai' | 'elevenlabs' | 'groq' | 'local';
|
||||
|
||||
export type DictationProviderStatus = {
|
||||
/**
|
||||
@@ -219,6 +219,40 @@ export type DictationProviderStatus = {
|
||||
uses_provider_config: boolean;
|
||||
};
|
||||
|
||||
export type DownloadProgress = {
|
||||
/**
|
||||
* Bytes downloaded so far
|
||||
*/
|
||||
bytes_downloaded: number;
|
||||
/**
|
||||
* Error message if failed
|
||||
*/
|
||||
error?: string | null;
|
||||
/**
|
||||
* Estimated time remaining in seconds
|
||||
*/
|
||||
eta_seconds?: number | null;
|
||||
/**
|
||||
* Model ID being downloaded
|
||||
*/
|
||||
model_id: string;
|
||||
/**
|
||||
* Download progress percentage (0-100)
|
||||
*/
|
||||
progress_percent: number;
|
||||
/**
|
||||
* Download speed in bytes per second
|
||||
*/
|
||||
speed_bps?: number | null;
|
||||
status: DownloadStatus;
|
||||
/**
|
||||
* Total bytes to download
|
||||
*/
|
||||
total_bytes: number;
|
||||
};
|
||||
|
||||
export type DownloadStatus = 'downloading' | 'completed' | 'failed' | 'cancelled';
|
||||
|
||||
export type EmbeddedResource = {
|
||||
_meta?: {
|
||||
[key: string]: unknown;
|
||||
@@ -1311,6 +1345,28 @@ export type UpsertPermissionsQuery = {
|
||||
tool_permissions: Array<ToolPermission>;
|
||||
};
|
||||
|
||||
export type WhisperModelResponse = {
|
||||
/**
|
||||
* Description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Model identifier (e.g., "tiny", "base", "small")
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Model file size in MB
|
||||
*/
|
||||
size_mb: number;
|
||||
/**
|
||||
* Download URL from HuggingFace
|
||||
*/
|
||||
url: string;
|
||||
} & {
|
||||
downloaded: boolean;
|
||||
recommended: boolean;
|
||||
};
|
||||
|
||||
export type WindowProps = {
|
||||
height: number;
|
||||
resizable: boolean;
|
||||
@@ -2522,6 +2578,124 @@ export type GetDictationConfigResponses = {
|
||||
|
||||
export type GetDictationConfigResponse = GetDictationConfigResponses[keyof GetDictationConfigResponses];
|
||||
|
||||
export type ListModelsData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: '/dictation/models';
|
||||
};
|
||||
|
||||
export type ListModelsResponses = {
|
||||
/**
|
||||
* List of available Whisper models
|
||||
*/
|
||||
200: Array<WhisperModelResponse>;
|
||||
};
|
||||
|
||||
export type ListModelsResponse = ListModelsResponses[keyof ListModelsResponses];
|
||||
|
||||
export type DeleteModelData = {
|
||||
body?: never;
|
||||
path: {
|
||||
model_id: string;
|
||||
};
|
||||
query?: never;
|
||||
url: '/dictation/models/{model_id}';
|
||||
};
|
||||
|
||||
export type DeleteModelErrors = {
|
||||
/**
|
||||
* Model not found or not downloaded
|
||||
*/
|
||||
404: unknown;
|
||||
/**
|
||||
* Failed to delete model
|
||||
*/
|
||||
500: unknown;
|
||||
};
|
||||
|
||||
export type DeleteModelResponses = {
|
||||
/**
|
||||
* Model deleted
|
||||
*/
|
||||
200: unknown;
|
||||
};
|
||||
|
||||
export type CancelDownloadData = {
|
||||
body?: never;
|
||||
path: {
|
||||
model_id: string;
|
||||
};
|
||||
query?: never;
|
||||
url: '/dictation/models/{model_id}/download';
|
||||
};
|
||||
|
||||
export type CancelDownloadErrors = {
|
||||
/**
|
||||
* Download not found
|
||||
*/
|
||||
404: unknown;
|
||||
};
|
||||
|
||||
export type CancelDownloadResponses = {
|
||||
/**
|
||||
* Download cancelled
|
||||
*/
|
||||
200: unknown;
|
||||
};
|
||||
|
||||
export type GetDownloadProgressData = {
|
||||
body?: never;
|
||||
path: {
|
||||
model_id: string;
|
||||
};
|
||||
query?: never;
|
||||
url: '/dictation/models/{model_id}/download';
|
||||
};
|
||||
|
||||
export type GetDownloadProgressErrors = {
|
||||
/**
|
||||
* Download not found
|
||||
*/
|
||||
404: unknown;
|
||||
};
|
||||
|
||||
export type GetDownloadProgressResponses = {
|
||||
/**
|
||||
* Download progress
|
||||
*/
|
||||
200: DownloadProgress;
|
||||
};
|
||||
|
||||
export type GetDownloadProgressResponse = GetDownloadProgressResponses[keyof GetDownloadProgressResponses];
|
||||
|
||||
export type DownloadModelData = {
|
||||
body?: never;
|
||||
path: {
|
||||
model_id: string;
|
||||
};
|
||||
query?: never;
|
||||
url: '/dictation/models/{model_id}/download';
|
||||
};
|
||||
|
||||
export type DownloadModelErrors = {
|
||||
/**
|
||||
* Download already in progress
|
||||
*/
|
||||
400: unknown;
|
||||
/**
|
||||
* Internal server error
|
||||
*/
|
||||
500: unknown;
|
||||
};
|
||||
|
||||
export type DownloadModelResponses = {
|
||||
/**
|
||||
* Download started
|
||||
*/
|
||||
202: unknown;
|
||||
};
|
||||
|
||||
export type TranscribeDictationData = {
|
||||
body: TranscribeRequest;
|
||||
path?: never;
|
||||
@@ -2539,7 +2713,7 @@ export type TranscribeDictationErrors = {
|
||||
*/
|
||||
401: unknown;
|
||||
/**
|
||||
* DictationProvider not configured
|
||||
* Provider not configured
|
||||
*/
|
||||
412: unknown;
|
||||
/**
|
||||
@@ -2555,7 +2729,7 @@ export type TranscribeDictationErrors = {
|
||||
*/
|
||||
500: unknown;
|
||||
/**
|
||||
* DictationProvider API error
|
||||
* Provider API error
|
||||
*/
|
||||
502: unknown;
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user