[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-336":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},336,"whisper","openai\u002Fwhisper","openai","Robust Speech Recognition via Large-Scale Weak Supervision","",null,"Python",102842,12547,751,122,0,65,533,3198,340,120,"MIT License",false,"main",[],"2026-06-17 04:00:02","# Whisper\n\n[[Blog]](https:\u002F\u002Fopenai.com\u002Fblog\u002Fwhisper)\n[[Paper]](https:\u002F\u002Farxiv.org\u002Fabs\u002F2212.04356)\n[[Model card]](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fwhisper\u002Fblob\u002Fmain\u002Fmodel-card.md)\n[[Colab example]](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fopenai\u002Fwhisper\u002Fblob\u002Fmaster\u002Fnotebooks\u002FLibriSpeech.ipynb)\n\nWhisper is a general-purpose speech recognition model. It is trained on a large dataset of diverse audio and is also a multitasking model that can perform multilingual speech recognition, speech translation, and language identification.\n\n\n## Approach\n\n![Approach](https:\u002F\u002Fraw.githubusercontent.com\u002Fopenai\u002Fwhisper\u002Fmain\u002Fapproach.png)\n\nA Transformer sequence-to-sequence model is trained on various speech processing tasks, including multilingual speech recognition, speech translation, spoken language identification, and voice activity detection. These tasks are jointly represented as a sequence of tokens to be predicted by the decoder, allowing a single model to replace many stages of a traditional speech-processing pipeline. The multitask training format uses a set of special tokens that serve as task specifiers or classification targets.\n\n\n## Setup\n\nWe used Python 3.9.9 and [PyTorch](https:\u002F\u002Fpytorch.org\u002F) 1.10.1 to train and test our models, but the codebase is expected to be compatible with Python 3.8-3.11 and recent PyTorch versions. The codebase also depends on a few Python packages, most notably [OpenAI's tiktoken](https:\u002F\u002Fgithub.com\u002Fopenai\u002Ftiktoken) for their fast tokenizer implementation. You can download and install (or update to) the latest release of Whisper with the following command:\n\n    pip install -U openai-whisper\n\nAlternatively, the following command will pull and install the latest commit from this repository, along with its Python dependencies:\n\n    pip install git+https:\u002F\u002Fgithub.com\u002Fopenai\u002Fwhisper.git \n\nTo update the package to the latest version of this repository, please run:\n\n    pip install --upgrade --no-deps --force-reinstall git+https:\u002F\u002Fgithub.com\u002Fopenai\u002Fwhisper.git\n\nIt also requires the command-line tool [`ffmpeg`](https:\u002F\u002Fffmpeg.org\u002F) to be installed on your system, which is available from most package managers:\n\n```bash\n# on Ubuntu or Debian\nsudo apt update && sudo apt install ffmpeg\n\n# on Arch Linux\nsudo pacman -S ffmpeg\n\n# on MacOS using Homebrew (https:\u002F\u002Fbrew.sh\u002F)\nbrew install ffmpeg\n\n# on Windows using Chocolatey (https:\u002F\u002Fchocolatey.org\u002F)\nchoco install ffmpeg\n\n# on Windows using Scoop (https:\u002F\u002Fscoop.sh\u002F)\nscoop install ffmpeg\n```\n\nYou may need [`rust`](http:\u002F\u002Frust-lang.org) installed as well, in case [tiktoken](https:\u002F\u002Fgithub.com\u002Fopenai\u002Ftiktoken) does not provide a pre-built wheel for your platform. If you see installation errors during the `pip install` command above, please follow the [Getting started page](https:\u002F\u002Fwww.rust-lang.org\u002Flearn\u002Fget-started) to install Rust development environment. Additionally, you may need to configure the `PATH` environment variable, e.g. `export PATH=\"$HOME\u002F.cargo\u002Fbin:$PATH\"`. If the installation fails with `No module named 'setuptools_rust'`, you need to install `setuptools_rust`, e.g. by running:\n\n```bash\npip install setuptools-rust\n```\n\n\n## Available models and languages\n\nThere are six model sizes, four with English-only versions, offering speed and accuracy tradeoffs.\nBelow are the names of the available models and their approximate memory requirements and inference speed relative to the large model.\nThe relative speeds below are measured by transcribing English speech on a A100, and the real-world speed may vary significantly depending on many factors including the language, the speaking speed, and the available hardware.\n\n|  Size  | Parameters | English-only model | Multilingual model | Required VRAM | Relative speed |\n|:------:|:----------:|:------------------:|:------------------:|:-------------:|:--------------:|\n|  tiny  |    39 M    |     `tiny.en`      |       `tiny`       |     ~1 GB     |      ~10x      |\n|  base  |    74 M    |     `base.en`      |       `base`       |     ~1 GB     |      ~7x       |\n| small  |   244 M    |     `small.en`     |      `small`       |     ~2 GB     |      ~4x       |\n| medium |   769 M    |    `medium.en`     |      `medium`      |     ~5 GB     |      ~2x       |\n| large  |   1550 M   |        N\u002FA         |      `large`       |    ~10 GB     |       1x       |\n| turbo  |   809 M    |        N\u002FA         |      `turbo`       |     ~6 GB     |      ~8x       |\n\nThe `.en` models for English-only applications tend to perform better, especially for the `tiny.en` and `base.en` models. We observed that the difference becomes less significant for the `small.en` and `medium.en` models.\nAdditionally, the `turbo` model is an optimized version of `large-v3` that offers faster transcription speed with a minimal degradation in accuracy.\n\nWhisper's performance varies widely depending on the language. The figure below shows a performance breakdown of `large-v3` and `large-v2` models by language, using WERs (word error rates) or CER (character error rates, shown in *Italic*) evaluated on the Common Voice 15 and Fleurs datasets. Additional WER\u002FCER metrics corresponding to the other models and datasets can be found in Appendix D.1, D.2, and D.4 of [the paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2212.04356), as well as the BLEU (Bilingual Evaluation Understudy) scores for translation in Appendix D.3.\n\n![WER breakdown by language](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fwhisper\u002Fassets\u002F266841\u002Ff4619d66-1058-4005-8f67-a9d811b77c62)\n\n## Command-line usage\n\nThe following command will transcribe speech in audio files, using the `turbo` model:\n\n```bash\nwhisper audio.flac audio.mp3 audio.wav --model turbo\n```\n\nThe default setting (which selects the `turbo` model) works well for transcribing English. However, **the `turbo` model is not trained for translation tasks**. If you need to **translate non-English speech into English**, use one of the **multilingual models** (`tiny`, `base`, `small`, `medium`, `large`) instead of `turbo`. \n\nFor example, to transcribe an audio file containing non-English speech, you can specify the language:\n\n```bash\nwhisper japanese.wav --language Japanese\n```\n\nTo **translate** speech into English, use:\n\n```bash\nwhisper japanese.wav --model medium --language Japanese --task translate\n```\n\n> **Note:** The `turbo` model will return the original language even if `--task translate` is specified. Use `medium` or `large` for the best translation results.\n\nRun the following to view all available options:\n\n```bash\nwhisper --help\n```\n\nSee [tokenizer.py](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fwhisper\u002Fblob\u002Fmain\u002Fwhisper\u002Ftokenizer.py) for the list of all available languages.\n\n\n## Python usage\n\nTranscription can also be performed within Python: \n\n```python\nimport whisper\n\nmodel = whisper.load_model(\"turbo\")\nresult = model.transcribe(\"audio.mp3\")\nprint(result[\"text\"])\n```\n\nInternally, the `transcribe()` method reads the entire file and processes the audio with a sliding 30-second window, performing autoregressive sequence-to-sequence predictions on each window.\n\nBelow is an example usage of `whisper.detect_language()` and `whisper.decode()` which provide lower-level access to the model.\n\n```python\nimport whisper\n\nmodel = whisper.load_model(\"turbo\")\n\n# load audio and pad\u002Ftrim it to fit 30 seconds\naudio = whisper.load_audio(\"audio.mp3\")\naudio = whisper.pad_or_trim(audio)\n\n# make log-Mel spectrogram and move to the same device as the model\nmel = whisper.log_mel_spectrogram(audio, n_mels=model.dims.n_mels).to(model.device)\n\n# detect the spoken language\n_, probs = model.detect_language(mel)\nprint(f\"Detected language: {max(probs, key=probs.get)}\")\n\n# decode the audio\noptions = whisper.DecodingOptions()\nresult = whisper.decode(model, mel, options)\n\n# print the recognized text\nprint(result.text)\n```\n\n## More examples\n\nPlease use the [🙌 Show and tell](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fwhisper\u002Fdiscussions\u002Fcategories\u002Fshow-and-tell) category in Discussions for sharing more example usages of Whisper and third-party extensions such as web demos, integrations with other tools, ports for different platforms, etc.\n\n\n## License\n\nWhisper's code and model weights are released under the MIT License. See [LICENSE](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fwhisper\u002Fblob\u002Fmain\u002FLICENSE) for further details.\n","Whisper 是一个通用的语音识别模型，能够处理多语言语音识别、语音翻译和语言识别等多种任务。它基于Transformer序列到序列架构，通过大规模多样化音频数据集训练而成，能够在单一模型中集成传统语音处理流程中的多个阶段。Whisper的核心技术特点是其多任务学习能力，使用一组特殊标记作为任务指示符或分类目标，使得模型能够灵活应对不同的语音处理需求。适用于需要高质量、多语言支持的语音转文字应用场景，如会议记录、视频字幕生成以及跨语言交流辅助等。",2,"2026-06-17 02:34:12","top_all"]