{"id":24760927,"url":"https://github.com/ziozzang/whisper-api-server","last_synced_at":"2026-04-18T04:31:51.014Z","repository":{"id":228928180,"uuid":"775294441","full_name":"ziozzang/Whisper-API-Server","owner":"ziozzang","description":"Whisper OpenAI Compatible API server","archived":false,"fork":false,"pushed_at":"2024-03-21T05:50:34.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T12:13:02.869Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ziozzang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-21T05:41:37.000Z","updated_at":"2024-11-09T07:50:05.000Z","dependencies_parsed_at":"2024-03-21T06:48:42.587Z","dependency_job_id":null,"html_url":"https://github.com/ziozzang/Whisper-API-Server","commit_stats":null,"previous_names":["ziozzang/whisper-api-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ziozzang/Whisper-API-Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziozzang%2FWhisper-API-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziozzang%2FWhisper-API-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziozzang%2FWhisper-API-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziozzang%2FWhisper-API-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ziozzang","download_url":"https://codeload.github.com/ziozzang/Whisper-API-Server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziozzang%2FWhisper-API-Server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31956825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-28T18:20:06.824Z","updated_at":"2026-04-18T04:31:50.945Z","avatar_url":"https://github.com/ziozzang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Whisper API Server (OpenAI compatible API)\nThis is a Flask-based API server that provides speech-to-text transcription functionality using the Faster Whisper library. It supports multiple pre-trained models and allows users to transcribe audio files in various formats.\n\nThis server's API is fully compatible original OpenAI's whisper API spec.\n- https://platform.openai.com/docs/api-reference/audio/json-object\n\n# Author\n- code by Jioh L. Jung\n- Code and manual readme file was created with Claude3 opus(AI assisted).\n\n# License\n- MIT License\n\n# Requirements\n- Python 3.6 or higher\n- Flask\n- faster-whisper\n- soundfile\n- torch\n\n# Installation\n- Clone the repository or download the source code.\n- Install the required dependencies using pip:\n\n```\npip install -r requirements.txt\n```\n\n- Download the pre-trained models you want to use and place them in the appropriate directory.\n\n# Usage\nStart the API server by running the following command:\n\n```\npython api-server.py\n```\n- The server will start running on http://0.0.0.0:2638.\n\n- Send a POST request to the /v1/audio/transcriptions endpoint with the following parameters:\n - file (required): The audio file to be transcribed. Supported formats: WAV, MP3, MP4, MPEG, MPGA, M4A, WEBM.\n - model (optional): The name of the pre-trained model to use for transcription. Default: tiny.en. Available models are defined in the MODELS_LIST variable.\n - min_silence_duration_ms (optional): The minimum duration of silence (in milliseconds) to be considered as a separate segment. Default: 500.\n - temperature (optional): The temperature value for the transcription model. Default: 0.0.\n - language (optional): The language of the audio file. Default: auto (automatic detection).\n - response_format (optional): The format of the response. Supported formats: json, text, srt, verbose_json, vtt. Default: json.\n\n- The API will respond with the transcription result in the specified format.\n\n# Transcription Process\n- The API server receives the audio file and reads it into memory using io.BytesIO().\n- The audio data is then converted to WAV format using the soundfile library.\n- The Faster Whisper model is loaded based on the specified model parameter. The server attempts to use the available device in the following order: CUDA, MPS (for macOS), CPU.\n- The audio data is transcribed using the loaded model with the specified parameters (min_silence_duration_ms, temperature, language).\n- The transcription result is formatted according to the response_format parameter and returned as the API response.\n\n# Supported Response Formats\n- json: Returns the transcription result as a JSON object with a single text field containing the transcribed text.\n- text: Returns the transcribed text as plain text.\n- srt: Returns the transcription result in the SubRip (SRT) subtitle format.\n- verbose_json: Returns a detailed JSON object containing additional information about the transcription, such as segment timestamps, tokens, and probabilities.\n- vtt: Returns the transcription result in the Web Video Text Tracks (WebVTT) format.\n\n# Error Handling\nThe API server handles the following error scenarios:\n\n- If no file is uploaded, it returns a 400 Bad Request response with an error message.\n- If an unknown model name is specified, it returns a 400 Bad Request response with an error message and the list of available models.\n- If no speech is detected in the audio file, it returns a 400 Bad Request response with an error message.\nNotes\n- The server runs on http://0.0.0.0:2638 by default. You can modify the host and port parameters in the app.run() function call to change the server's address and port.\n- The available pre-trained models are defined in the MODELS_LIST variable. You can uncomment or add more models as needed.\n- The server attempts to use the available device for model loading in the following order: CUDA, MPS (for macOS), CPU. If a device is not available or fails, it falls back to the next available device.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziozzang%2Fwhisper-api-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fziozzang%2Fwhisper-api-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziozzang%2Fwhisper-api-server/lists"}