{"id":28749192,"url":"https://github.com/moonshine-ai/moonshine","last_synced_at":"2026-03-16T23:01:46.431Z","repository":{"id":259064310,"uuid":"867866058","full_name":"moonshine-ai/moonshine","owner":"moonshine-ai","description":"Fast and accurate automatic speech recognition (ASR) for edge devices","archived":false,"fork":false,"pushed_at":"2026-02-10T01:25:01.000Z","size":287211,"stargazers_count":3136,"open_issues_count":25,"forks_count":160,"subscribers_count":39,"default_branch":"main","last_synced_at":"2026-02-10T06:44:24.445Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moonshine-ai.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-04T22:10:28.000Z","updated_at":"2026-02-10T03:32:08.000Z","dependencies_parsed_at":"2025-01-26T17:18:58.127Z","dependency_job_id":"79378cd6-cfcb-4f2f-813e-2a4fdbcc89c2","html_url":"https://github.com/moonshine-ai/moonshine","commit_stats":null,"previous_names":["usefulsensors/moonshine","moonshine-ai/moonshine"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/moonshine-ai/moonshine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonshine-ai%2Fmoonshine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonshine-ai%2Fmoonshine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonshine-ai%2Fmoonshine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonshine-ai%2Fmoonshine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moonshine-ai","download_url":"https://codeload.github.com/moonshine-ai/moonshine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonshine-ai%2Fmoonshine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29325727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T02:08:56.257Z","status":"ssl_error","status_checked_at":"2026-02-11T02:08:51.338Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-06-16T20:00:57.932Z","updated_at":"2026-02-11T02:20:11.982Z","avatar_url":"https://github.com/moonshine-ai.png","language":"C","funding_links":[],"categories":["Artificial Intelligence","STT (Speech-to-Text) | 语音转文本","2. Model Codebases \u0026 Model Families","Python","Repos","C++","C","\u003ca name=\"Python\"\u003e\u003c/a\u003ePython","🌐 Web Development - Frontend","Audio Transcription","3. Speech-to-text (STT / ASR)"],"sub_categories":["Android Launcher","Open Source STT Models | 开源 STT 模型","Context-Relevant MCP Servers","Open source"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"logo.png\" width=\"192px\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 style=\"text-align:center;\"\u003eMoonshine\u003c/h1\u003e\n\n[[Blog]](https://petewarden.com/2024/10/21/introducing-moonshine-the-new-state-of-the-art-for-speech-to-text/) [[Paper 1]](https://arxiv.org/abs/2410.15608) [[Paper 2]](https://arxiv.org/abs/2509.02523) [[Model Card]](https://github.com/moonshine-ai/moonshine/blob/main/model-card.md) [[Podcast]](https://notebooklm.google.com/notebook/d787d6c2-7d7b-478c-b7d5-a0be4c74ae19/audio) | [[Join our Discord for questions and support](https://discord.gg/27qp9zSRXF)]\n\nMoonshine is a family of speech-to-text models optimized for fast and accurate automatic speech recognition (ASR) on resource-constrained devices. It is well-suited to real-time, on-device applications like live transcription and voice command recognition. English Moonshine obtains word-error rates (WER) better than similarly-sized Tiny and Base Whisper on the [OpenASR leaderboard](https://huggingface.co/spaces/hf-audio/open_asr_leaderboard), and non-English Moonshine variants [outperform](#supported-languages) Whisper Small and Medium, which are 9x and 28x larger, respectively.\n\nMoonshine processes audio segments between _5x-15x faster_ than Whisper while maintaining the same (or significantly better!) WER/CER. This is because its compute requirements scale with the length of input audio. Shorter input audio is processed faster, unlike Whisper models that process everything as 30-second chunks.\n\nUnquantized Base is 62M parameters (or 400MB), while Tiny is 27M parameters (around 190MB).\n\n## Supported Languages\n\nMoonshine currently supports 8 languages. Below is a performance summary. Arabic, Chinese, Japanese, and Korean are character-error rates (CER); all others are WER.\n\n| Language    | Tag  | Moonshine Tiny (27M) | Moonshine Base (62M) | Whisper Tiny (39M)  | Whisper Base (74M) | Whisper Small (244M) | Whisper Medium (769M) |\n| ----------  | ---- | ---------      | -------        | -------      | -------      | -------       | -------        |\n| Arabic      | `ar` | 24.76          |                | 52.40        | 48.25        | 32.44         | 25.44          |\n| English     |      | 12.66          | 10.07          | 12.81        | 10.32        |               |                |\n| Chinese     | `zh` | 32.77          |                | 68.51        | 59.13        | 46.76         | 40.41          |\n| Japanese    | `ja` | 15.69          |                | 96.71        | 72.69        | 40.94         | 27.88          |\n| Korean      | `ko` | 9.85           |                | 23.92        | 15.93        | 9.87          | 7.68           |\n| Spanish     | `es` |                | TBA            |              |              |               |                |\n| Ukrainian   | `uk` | 19.70          |                | 66.77        | 48.56        | 25.93         | 16.51          |\n| Vietnamese  | `vi` | 15.92          |                | 96.4         | 52.79        | 26.46         | 18.49          |\n\n\u003cimg width=\"2967\" height=\"929\" alt=\"error_delta_bar\" src=\"https://github.com/user-attachments/assets/ec3c7f61-2d98-495f-9fa7-ed5bccfdc83d\" /\u003e\n\nRead [the paper](https://arxiv.org/abs/2509.02523) for more details on our non-English flavors of Moonshine.\n\n## Supported Backends\n\nWith the release of new Moonshine languages, we have deprecated the Keras-based `moonshine` package. We recommend using Hugging Face `transformers` for vibe-checking the models, and using the ONNX runtime via `moonshine-onnx` for on-device applications. This table summarizes support:\n\n| Model     | Language | `transformers` | ONNX      | Keras (deprecated) |\n| -------   | ---      | ----           | ---       | ---                |\n| `tiny-ar` | Arabic   | ✅              | ✅        | ❌                 |\n| `tiny-zh` | Chinese  | ✅              | ✅        | ❌        |\n| `tiny`    | English  | ✅              | ✅        | ✅        |\n| `base`    | English  | ✅              | ✅        | ✅        |\n| `tiny-ja` | Japanese | ✅              | ✅        | ❌        |\n| `tiny-ko` | Korean   | ✅              | ✅        | ❌        |\n| `base-es` | Spanish  | ✅              | ✅        | ❌        |\n| `tiny-uk` | Ukrainian  | ✅              | ✅      | ❌        |\n| `tiny-vi` | Vietnamese | ✅              | ✅      | ❌        |\n\n## Table of Contents\n\n- [Installation](#installation)\n  - [1. Create a virtual environment](#1-create-a-virtual-environment)\n  - [2. Install `useful-moonshine-onnx`](#2-install-useful-moonshine-onnx)\n  - [3. Try it out](#3-try-it-out)\n- [Examples](#examples)\n  - [Hugging Face Transformers](#huggingface-transformers)\n  - [Live Captions](#live-captions)\n  - [CTranslate2](#ctranslate2)\n  - [Web Applications](#web-applications)\n  - [Discord](#discord)\n- [License](#license)\n- [Citation](#citation)\n\n## Installation\n\nWe like `uv` for managing Python environments, so we use it here. If you don't want to use it, simply skip the `uv` installation and leave `uv` off of your shell commands.\n\n### 1. Create a virtual environment\n\nFirst, [install](https://github.com/astral-sh/uv) `uv` for Python environment management.\n\nThen create and activate a virtual environment:\n\n```shell\nuv venv env_moonshine\nsource env_moonshine/bin/activate\n```\n\n### 2. Install `useful-moonshine-onnx`\n\nUsing Moonshine with the ONNX runtime is preferable if you want to run the models on SBCs like the Raspberry Pi. To use it, run the following:\n\n```shell\nuv pip install useful-moonshine-onnx@git+https://git@github.com/moonshine-ai/moonshine.git#subdirectory=moonshine-onnx\n```\n\n### 3. Try it out\n\nYou can test Moonshine by transcribing the provided example audio file with the `.transcribe` function:\n\n```shell\npython\n\u003e\u003e\u003e import moonshine_onnx\n\u003e\u003e\u003e moonshine_onnx.transcribe(moonshine_onnx.ASSETS_DIR / 'beckett.wav', 'moonshine/tiny')\n['Ever tried ever failed, no matter try again, fail again, fail better.']\n```\n\nThe first argument is a path to an audio file and the second is the name of a Moonshine model. `moonshine/tiny` and `moonshine/base` are English-only models. If you wish to use one of the non-English Moonshine models, just append the language [IETF tag](https://en.wikipedia.org/wiki/IETF_language_tag) to the model name, e.g., `moonshine/tiny-ko`. See [the table](#supported-languages) for supported languages and their tags.\n\n## Examples\n\nMoonshine models can be used in many applications, so we've included code samples showing how to use them in different situations. The [`demo`](/demo/) folder in this repository also has more information on them.\n\n### Hugging Face Transformers\n\nMoonshine is supported by the `transformers` library, as follows:\n\n```python\nimport torch\nfrom transformers import AutoProcessor, MoonshineForConditionalGeneration\nfrom datasets import load_dataset\n\nprocessor = AutoProcessor.from_pretrained(\"UsefulSensors/moonshine-tiny\")\nmodel = MoonshineForConditionalGeneration.from_pretrained(\"UsefulSensors/moonshine-tiny\")\n\nds = load_dataset(\"hf-internal-testing/librispeech_asr_dummy\", \"clean\", split=\"validation\")\naudio_array = ds[0][\"audio\"][\"array\"]\n\ninputs = processor(audio_array, return_tensors=\"pt\")\n\ngenerated_ids = model.generate(**inputs)\n\ntranscription = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]\nprint(transcription)\n```\n\nIf you wish to use one of the non-English Moonshine models, just append the [IETF code](https://en.wikipedia.org/wiki/IETF_language_tag) to the repo ID, e.g., `UsefulSensors/moonshine-tiny-ko`. See [the table](#supported-languages) for supported languages and their tags.\n\n### Live Captions\n\nYou can try the Moonshine ONNX models with live input from a microphone with the [live captions demo](/demo/README.md#demo-live-captioning-from-microphone-input).\n\n### CTranslate2\n\nThe files for the CTranslate2 versions of Moonshine are available at [huggingface.co/UsefulSensors/moonshine/tree/main/ctranslate2](https://huggingface.co/UsefulSensors/moonshine/tree/main/ctranslate2), but they require [a pull request to be merged](https://github.com/OpenNMT/CTranslate2/pull/1808) before they can be used with the mainline version of the framework. Until then, you should be able to try them with [our branch](https://github.com/njeffrie/CTranslate2/tree/master), with [this example script](https://github.com/OpenNMT/CTranslate2/pull/1808#issuecomment-2439725339).\n\n### Web Applications\n\nUse our [MoonshineJS](https://github.com/moonshine-ai/moonshine-js) library to run Moonshine models in the web browser with a few lines of Javascript.\n\n### Discord\n\nWe have [an active Discord server](https://discord.gg/27qp9zSRXF) where we're happy to answer questions, offer support, and generally geek out about voice AI, so please come [join the conversations](https://discord.gg/27qp9zSRXF). \n\n## License\nAll inference code in this repo is released under the MIT license. The English Moonshine models are also released under the MIT license. \n\nAll non-English Moonshine variants are released under the [Moonshine AI Community License](https://www.moonshine.ai/moonshine_community_license.txt) (TLDR: Models are free to use for researchers, developers, small businesses, and creators with less than $1M in annual revenue.). \n\nA copy of both licenses is included in this repository.\n\n## Citation\nIf you benefit from our work, please cite our paper:\n```\n@misc{jeffries2024moonshinespeechrecognitionlive,\n      title={Moonshine: Speech Recognition for Live Transcription and Voice Commands}, \n      author={Nat Jeffries and Evan King and Manjunath Kudlur and Guy Nicholson and James Wang and Pete Warden},\n      year={2024},\n      eprint={2410.15608},\n      archivePrefix={arXiv},\n      primaryClass={cs.SD},\n      url={https://arxiv.org/abs/2410.15608}, \n}\n```\n\nPlease also cite our paper on non-English Moonshine variants if you find them useful:\n```\n@misc{king2025flavorsmoonshinetinyspecialized,\n      title={Flavors of Moonshine: Tiny Specialized ASR Models for Edge Devices}, \n      author={Evan King and Adam Sabra and Manjunath Kudlur and James Wang and Pete Warden},\n      year={2025},\n      eprint={2509.02523},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL},\n      url={https://arxiv.org/abs/2509.02523}, \n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoonshine-ai%2Fmoonshine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoonshine-ai%2Fmoonshine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoonshine-ai%2Fmoonshine/lists"}