2020-03-16 08:50:54 +00:00
|
|
|
# Jasper ASR
|
|
|
|
|
|
|
|
|
|
[](https://github.com/python/black)
|
|
|
|
|
|
|
|
|
|
> Generates text from speech audio
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# Table of Contents
|
|
|
|
|
|
2020-08-06 17:10:14 +00:00
|
|
|
* [Prerequisites](#prerequisites)
|
2020-03-16 08:50:54 +00:00
|
|
|
* [Features](#features)
|
|
|
|
|
* [Installation](#installation)
|
|
|
|
|
* [Usage](#usage)
|
|
|
|
|
|
2020-08-06 17:10:14 +00:00
|
|
|
# Prerequisites
|
|
|
|
|
```bash
|
|
|
|
|
# apt install libsndfile-dev ffmpeg
|
|
|
|
|
```
|
|
|
|
|
|
2020-03-16 08:50:54 +00:00
|
|
|
# Features
|
|
|
|
|
|
|
|
|
|
* ASR using Jasper (from [NemoToolkit](https://github.com/NVIDIA/NeMo) )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Installation
|
|
|
|
|
To install the packages and its dependencies run.
|
|
|
|
|
```bash
|
|
|
|
|
python setup.py install
|
|
|
|
|
```
|
|
|
|
|
or with pip
|
|
|
|
|
```bash
|
2020-03-18 09:49:56 +00:00
|
|
|
pip install .[server]
|
2020-03-16 08:50:54 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The installation should work on Python 3.6 or newer. Untested on Python 2.7
|
|
|
|
|
|
|
|
|
|
# Usage
|
|
|
|
|
```python
|
|
|
|
|
from jasper.asr import JasperASR
|
|
|
|
|
asr_model = JasperASR("/path/to/model_config_yaml","/path/to/encoder_checkpoint","/path/to/decoder_checkpoint") # Loads the models
|
|
|
|
|
TEXT = asr_model.transcribe(wav_data) # Returns the text spoken in the wav
|
|
|
|
|
```
|