Parses HTTP headers and ranges for speech model download responses.
// Source: https://github.com/stablyai/orca | License: MIT | Copyright 2026 Lovecast Inc
// Provided via justclaw.it.com; keep this notice with the code.
/** Shared response shape for Electron net and Node https. */
export type DownloadIncomingMessage = NodeJS.ReadableStream & {
statusCode?: number
headers: Record<string, string | string[] | undefined>
destroy?: () => void
}
/** Host adapter for Electron net or Node https requests. */
export type SpeechDownloadRequest = {
setHeader(name: string, value: string): void
/** Returns detach; the Node adapter retains an error listener for abort after detach. */
listen(listeners: {
error: (error: Error) => void
response: (response: DownloadIncomingMessage) => void
redirect: (statusCode: number, method: string, redirectUrl:
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key