/ Модель

Характеристики

Контекст
194 токена
Лицензия
MIT
Архитектура
moonshine · dense
Библиотека
transformers
Опубликована
2 ноя 2024

moonshine-base

Распознавание речиАудио → текст4 профессии

Компактная модель Useful Sensors с 61 млн параметров для распознавания английской речи и транскрибирования на устройствах с ограниченными ресурсами.

24 097скачиваний за 30 дней48лайковвеса обновлены30 янв 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Распознавание речи» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки1

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

  • hf-audio/open-asr-leaderboard

    score · ниже — лучше

    Результат

    9,99

    librispeech_clean_wer 3,38spgispeech_wer 5,46tedlium_wer 5,65
    Hugging Face Leaderboards

    Публичная таблицаревизия не подтверждена

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Moonshine Base — компактная модель автоматического распознавания речи, разработанная Useful Sensors. Это последовательностная модель типа encoder-decoder с 61 млн параметров, предназначенная для транскрибирования английской речи в английский текст. Она рассчитана на разработчиков, которым нужно развернуть распознавание речи в реальном времени на устройствах с ограниченными памятью и вычислительными ресурсами; поддержка Transformers упрощает использование в соответствующих приложениях. Модель принимает аудио и выдаёт текст, обучена на 200 000 часах аудио с расшифровками и лицензирована по MIT.

По оценке разработчиков, Moonshine показывает более высокую точность на стандартных наборах данных, чем сопоставимые по размеру системы распознавания речи. Модель может ошибочно добавлять слова, которых нет в аудио, и повторять фрагменты текста; эти проблемы могут быть заметнее на коротких записях и аудио с обрезанными словами. Она предназначена для транскрибирования английской речи, а не для вывода субъективных характеристик говорящего или принятия высокорисковых решений. Перед применением в конкретной области требуется отдельная оценка качества.

Сценарии применения

  • транскрибирование английской речи на маломощном устройстве
  • создание субтитров для англоязычного аудио
  • распознавание речи в приложении с транскрипцией в реальном времени

Ограничения

Модель может галлюцинировать слова и повторять фрагменты, особенно на коротких записях и при обрезанных словах. Она не предназначена для субъективной классификации людей или высокорисковых решений; качество следует оценивать для конкретного сценария.

Для каких профессий подходит4

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Moonshine

[Blog] [Paper] [Installation] [Podcast]

This is the model card for running the automatic speech recognition (ASR) models (Moonshine models) trained and released by Useful Sensors.

Following Model Cards for Model Reporting (Mitchell et al.), we're providing some information about the automatic speech recognition model. More information on how these models were trained and evaluated can be found in the paper. Note, a lot of the text has been copied verbatim from the model card for the Whisper model developed by OpenAI, because both models serve identical purposes, and carry identical risks.

Usage

Moonshine is supported in Hugging Face 🤗 Transformers. To run the model, first install the Transformers library. For this example, we'll also install 🤗 Datasets to load toy audio dataset from the Hugging Face Hub, and 🤗 Accelerate to reduce the model loading time:

pip install --upgrade pip
pip install --upgrade transformers datasets[audio]
from transformers import MoonshineForConditionalGeneration, AutoProcessor
from datasets import load_dataset, Audio
import torch

device = "cuda:0" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32

model = MoonshineForConditionalGeneration.from_pretrained('UsefulSensors/moonshine-base').to(device).to(torch_dtype)
processor = AutoProcessor.from_pretrained('UsefulSensors/moonshine-base')

dataset = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
dataset = dataset.cast_column("audio", Audio(processor.feature_extractor.sampling_rate))
sample = dataset[0]["audio"]

inputs = processor(
    sample["array"], 
    return_tensors="pt",
    sampling_rate=processor.feature_extractor.sampling_rate
)
inputs = inputs.to(device, torch_dtype)

# to avoid hallucination loops, we limit the maximum length of the generated text based expected number of tokens per second
token_limit_factor = 6.5 / processor.feature_extractor.sampling_rate  # Maximum of 6.5 tokens per second
seq_lens = inputs.attention_mask.sum(dim=-1)
max_length = int((seq_lens * token_limit_factor).max().item())

generated_ids = model.generate(**inputs, max_length=max_length)
print(processor.decode(generated_ids[0], skip_special_tokens=True))

Model Details

The Moonshine models are trained for the speech recognition task, capable of transcribing English speech audio into English text. Useful Sensors developed the models to support their business direction of developing real time speech transcription products based on low cost hardware. There are 2 models of different sizes and capabilities, summarized in the following table.

SizeParametersEnglish-only modelMultilingual model
tiny27 M✓
base61 M✓

Release date

October 2024

Model type

Sequence-to-sequence ASR (automatic speech recognition) and speech translation model

Paper & samples

Paper / Blog

Model Use

Evaluated Use

The primary intended users of these models are AI developers that want to deploy English speech recognition systems in platforms that are severely constrained in memory capacity and computational resources. We recognize that once models are released, it is impossible to restrict access to only “intended” uses or to draw reasonable guidelines around what is or is not safe use.

The models are primarily trained and evaluated on English ASR task. They may exhibit additional capabilities, particularly if fine-tuned on certain tasks like voice activity detection, speaker classification, or speaker diarization but have not been robustly evaluated in these areas. We strongly recommend that users perform robust evaluations of the models in a particular context and domain before deploying them.

In particular, we caution against using Moonshine models to transcribe recordings of individuals taken without their consent or purporting to use these models for any kind of subjective classification. We recommend against use in high-risk domains like decision-making contexts, where flaws in accuracy can lead to pronounced flaws in outcomes. The models are intended to transcribe English speech, use of the model for classification is not only not evaluated but also not appropriate, particularly to infer human attributes.

Training Data

The models are trained on 200,000 hours of audio and the corresponding transcripts collected from the internet, as well as datasets openly available and accessible on HuggingFace. The open datasets used are listed in the the accompanying paper.

Performance and Limitations

Our evaluations show that, the models exhibit greater accuracy on standard datasets over existing ASR systems of similar sizes.

However, like any machine learning model, the predictions may include texts that are not actually spoken in the audio input (i.e. hallucination). We hypothesize that this happens because, given their general knowledge of language, the models combine trying to predict the next word in audio with trying to transcribe the audio itself.

In addition, the sequence-to-sequence architecture of the model makes it prone to generating repetitive texts, which can be mitigated to some degree by beam search and temperature scheduling but not perfectly. It is likely that this behavior and hallucinations may be worse for short audio segments, or segments where parts of words are cut off at the beginning or the end of the segment.

Broader Implications

We anticipate that Moonshine models’ transcription capabilities may be used for improving accessibility tools, especially for real-time transcription. The real value of beneficial applications built on top of Moonshine models suggests that the disparate performance of these models may have real economic implications.

There are also potential dual-use concerns that come with releasing Moonshine. While we hope the technology will be used primarily for beneficial purposes, making ASR technology more accessible could enable more actors to build capable surveillance technologies or scale up existing surveillance efforts, as the speed and accuracy allow for affordable automatic transcription and translation of large volumes of audio communication. Moreover, these models may have some capabilities to recognize specific individuals out of the box, which in turn presents safety concerns related both to dual use and disparate performance. In practice, we expect that the cost of transcription is not the limiting factor of scaling up surveillance projects.

Citation

If you benefit from our work, please cite us:

@misc{jeffries2024moonshinespeechrecognitionlive,
      title={Moonshine: Speech Recognition for Live Transcription and Voice Commands}, 
      author={Nat Jeffries and Evan King and Manjunath Kudlur and Guy Nicholson and James Wang and Pete Warden},
      year={2024},
      eprint={2410.15608},
      archivePrefix={arXiv},
      primaryClass={cs.SD},
      url={https://arxiv.org/abs/2410.15608}, 
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
MoonshineForConditionalGeneration
Ревизия весов
7a73d8d

0 моделей