File size: 6,880 Bytes
ecab563
 
 
 
 
 
8d6c391
 
 
5e88d56
8d6c391
4d18a16
9ef2068
d6cde26
8d6c391
 
 
 
 
 
ecab563
8d6c391
 
 
 
 
 
 
 
 
 
 
 
d6cde26
8d6c391
 
 
 
 
 
 
 
 
 
 
9ef2068
 
 
 
 
 
8d6c391
 
d6cde26
 
 
 
 
 
8d6c391
 
d6cde26
8d6c391
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ecab563
 
8d6c391
 
9ef2068
 
 
 
 
 
 
 
8d6c391
 
d6cde26
 
 
 
 
 
 
8d6c391
 
4d18a16
8d6c391
 
 
 
 
 
 
df63d34
8d6c391
 
 
 
 
 
 
 
df63d34
8d6c391
 
 
 
 
 
 
 
 
 
 
 
9ef2068
 
d6cde26
 
 
 
4d18a16
8d6c391
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
---
title: APi English
emoji: 🏒
colorFrom: pink
colorTo: green
sdk: docker
python_version: "3.12"
app_file: "app/main.py"
app_port: 7860
short_description: "English learning API"
models:
  - Qwen/Qwen2.5-1.5B-Instruct 
  - faster_whisper/faster-whisper-small-en
  - hexgrad/Kokoro-82M
  - allegro/BiDi-eng-pol
tags:
  - nlp
  - tts
  - asr
  - translation
license: mit
pinned: false
---

# 🏒 APi English

**APi English** is a FastAPI-based API to help learners improve their English using NLP, Text-to-Speech, Automatic Speech Recognition, and Translation.

---

## πŸš€ Features

- **NLP Chat**: Emma, your friendly English teacher, provides natural replies, grammar corrections, and vocabulary tips.
- **Text-to-Speech (TTS)**: Generates high-quality 24kHz WAV audio using the Kokoro neural TTS model with streaming inference.
- **Automatic Speech Recognition (ASR)**: Transcribes user audio into text.
- **Translation**: Translate between English and Polish.

---

## πŸ€– Models and Licenses

This project uses several open-source AI models from Hugging Face.  
Each model retains its original license as listed below:

### πŸ”Š Speech Recognition
- **Faster Whisper Small (English)**  
  Efficient CPU/GPU implementation of OpenAI Whisper Small.  
  Base model: **openai/whisper-small.en**  
  Licensed under [mit](https://choosealicense.com/licenses/mit/).  
  Implementation by [**Faster Whisper**](https://huggingface.co/Systran/faster-whisper-small.en)


### πŸ—£οΈ Text-to-Speech (TTS)
- [**hexgrad/Kokoro-82M**](https://huggingface.co/hexgrad/Kokoro-82M)  
  Lightweight, high-quality neural Text-to-Speech model with streaming inference support.  
  Supports multiple voices and automatic language detection.  
  Licensed under the **Apache License 2.0**.  
  Developed by **Hexgrad**.


### πŸ’¬ Natural Language Processing (Chat & Grammar)
- [**Qwen/Qwen2.5-1.5B-Instruct**](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct)  
  Licensed under [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).  
  Developed by [**Qwen Team**](https://qwen.ai/)

### 🌐 Translation
- [**Allegro/BiDi-eng-pol**](https://huggingface.co/allegro/BiDi-eng-pol)  
  Licensed under [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/).  
  Developed by [**Allegro ML Research**](https://ml.allegro.tech/)

---

## βš–οΈ License Notice

This project integrates open-source models and fully complies with their respective licenses.  
All rights to the models belong to their original creators.  
The source code of this application is distributed separately under the license defined in this repository.

---

## πŸ“š References

### 1. Faster Whisper Small (English) β€” Systran
@misc{faster_whisper_small,
  title = {Faster Whisper Small English},
  author = {Systran AI},
  note = {CTranslate2-converted version of [**OpenAI Whisper Small**](https://huggingface.co/openai/whisper-small.en) for fast inference with faster_whisper},
  url = {https://huggingface.co/Systran/faster-whisper-small.en},
  year = {2024},
  license = {MIT (conversion), original model Apache 2.0}
}

### 2. Kokoro-82M β€” Hexgrad
@misc{kokoro82m,
  title = {Kokoro-82M: Lightweight Neural Text-to-Speech},
  author = {Hexgrad},
  year = {2024},
  url = {https://huggingface.co/hexgrad/Kokoro-82M},
  license = {Apache License 2.0}
}

### 3. Qwen/Qwen2.5-1.5B-Instruct  β€” Qwen Team
@misc{qwen2.5,
    title = {Qwen2.5: A Party of Foundation Models},
    url = {https://qwenlm.github.io/blog/qwen2.5/},
    author = {Qwen Team},
    month = {September},
    year = {2024}
}

@article{qwen2,
      title={Qwen2 Technical Report}, 
      author={An Yang and Baosong Yang and Binyuan Hui and Bo Zheng and Bowen Yu and Chang Zhou and Chengpeng Li and Chengyuan Li and Dayiheng Liu and Fei Huang and Guanting Dong and Haoran Wei and Huan Lin and Jialong Tang and Jialin Wang and Jian Yang and Jianhong Tu and Jianwei Zhang and Jianxin Ma and Jin Xu and Jingren Zhou and Jinze Bai and Jinzheng He and Junyang Lin and Kai Dang and Keming Lu and Keqin Chen and Kexin Yang and Mei Li and Mingfeng Xue and Na Ni and Pei Zhang and Peng Wang and Ru Peng and Rui Men and Ruize Gao and Runji Lin and Shijie Wang and Shuai Bai and Sinan Tan and Tianhang Zhu and Tianhao Li and Tianyu Liu and Wenbin Ge and Xiaodong Deng and Xiaohuan Zhou and Xingzhang Ren and Xinyu Zhang and Xipin Wei and Xuancheng Ren and Yang Fan and Yang Yao and Yichang Zhang and Yu Wan and Yunfei Chu and Yuqiong Liu and Zeyu Cui and Zhenru Zhang and Zhihao Fan},
      journal={arXiv preprint arXiv:2407.10671},
      year={2024}
}



### 4. Allegro/BiDi-eng-pol β€” Allegro ML Research
Authors:
- MLR @ Allegro: [Artur Kot](https://linkedin.com/in/arturkot), [MikoΕ‚aj Koszowski](https://linkedin.com/in/mkoszowski), [Wojciech Chojnowski](https://linkedin.com/in/wojciech-chojnowski-744702348), [Mieszko Rutkowski](https://linkedin.com/in/mieszko-rutkowski)
- Laniqo.com: [Artur Nowakowski](https://linkedin.com/in/artur-nowakowski-mt), [Kamil Guttmann](https://linkedin.com/in/kamil-guttmann), [MikoΕ‚aj Pokrywka](https://linkedin.com/in/mikolaj-pokrywka)


## πŸ™ Attributions

This project would not be possible without the amazing work of the open-source community.  
Special thanks to the teams and organizations that created and maintain the following models and tools:

- **[OpenAI](https://openai.com/)** for [**Whisper Small (English)**](https://huggingface.co/openai/whisper-small.en) β€” Licensed under [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).  
- **[Systran / Faster Whisper](https://huggingface.co/Systran/faster-whisper-small.en)** for [**Faster Whisper Small (English)**](https://huggingface.co/openai/whisper-small.en) β€” a CTranslate2-converted version of **OpenAI Whisper Small**, optimized for fast CPU/GPU inference.  
Licensed under [MIT](https://choosealicense.com/licenses/mit/) and Apache 2.0 (original model)
- **[Hexgrad](https://huggingface.co/hexgrad)** for  
  [**Kokoro-82M**](https://huggingface.co/hexgrad/Kokoro-82M) β€”  
  a lightweight neural Text-to-Speech model with streaming audio generation.  
  Licensed under the **Apache License 2.0**.
- **[Qwen Team](https://qwen.ai/)** for [**Qwen/Qwen2.5-1.5B-Instruct**](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct) β€” Licensed under [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).  
- **[Allegro ML Research](https://ml.allegro.tech/)** for [**BiDi-eng-pol**](https://huggingface.co/allegro/BiDi-eng-pol) β€” Licensed under [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/).  

This application uses these models for educational and research purposes only, in full compliance with their respective licenses.  
All rights, trademarks, and credits belong to their original creators.