返回模型
说明文档
模型卡片
<!-- 简要说明该模型是什么/做什么。 -->
模型详情
模型描述
这是原始版本 mohammed/whisper-small-arabic-cv-11 的量化模型
- 开发者: Mohammed Bakheet
- 资助方 [可选]: Kalam Technology
- 语言(NLP): 阿拉伯语,英语
用途
这是一个量化模型,可以读取阿拉伯语音并将其转录/翻译成英语
直接使用
首先,使用以下命令安装以下软件包:
pip install -U optimum[exporters,onnxruntime] transformers pip install huggingface_hub
# 如果您使用的是笔记本,请取消以下安装注释:
#!pip install -U optimum[exporters,onnxruntime] transformers
#!pip install huggingface_hub
# 导入所需的软件包
from optimum.onnxruntime import ORTModelForSpeechSeq2Seq
from transformers import WhisperTokenizerFast, WhisperFeatureExtractor, pipeline
# 设置模型名称/ID
model_name = 'mohammed/quantized-whisper-small' # 文件夹名称
model = ORTModelForSpeechSeq2Seq.from_pretrained(model_name, export=False)
tokenizer = WhisperTokenizerFast.from_pretrained(model_name)
feature_extractor = WhisperFeatureExtractor.from_pretrained(model_name)
forced_decoder_ids = tokenizer.get_decoder_prompt_ids(language=\"ar\", task=\"transcribe\")
pipe = pipeline('automatic-speech-recognition',
model=model,
tokenizer=tokenizer,
feature_extractor=feature_extractor,
model_kwargs={\"forced_decoder_ids\": forced_decoder_ids})
# 要转录的文件
pipe('Recording.mp3')
超出范围的使用
<!-- 本节说明模型的误用、恶意使用以及模型不适合的用途。 -->
该模型对阿拉伯语语音进行直接翻译,而不是直接转录,我们仍在努力改进这一点。
建议
<!-- 本节旨在传达有关偏见、风险和技术限制的建议。 -->
用户(无论是直接用户还是下游用户)都应该了解该模型的风险、偏见和局限性。需要更多信息以提供进一步建议。
如何开始使用该模型
使用以下代码开始使用该模型。
首先,使用以下命令安装以下软件包:
pip install -U optimum[exporters,onnxruntime] transformers
pip install huggingface_hub
from optimum.onnxruntime import ORTModelForSpeechSeq2Seq
from transformers import WhisperTokenizerFast, WhisperFeatureExtractor, pipeline
model_name = 'mohammed/quantized-whisper-small' # 文件夹名称
model = ORTModelForSpeechSeq2Seq.from_pretrained(model_name, export=False)
tokenizer = WhisperTokenizerFast.from_pretrained(model_name)
feature_extractor = WhisperFeatureExtractor.from_pretrained(model_name)
forced_decoder_ids = tokenizer.get_decoder_prompt_ids(language=\"ar\", task=\"transcribe\")
pipe = pipeline('automatic-speech-recognition',
model=model,
tokenizer=tokenizer,
feature_extractor=feature_extractor,
model_kwargs={\"forced_decoder_ids\": forced_decoder_ids})
# 要转录的文件
pipe('Recording.mp3')
训练数据
请参阅原始模型 "mohammed/whisper-small-arabic-cv-11"
训练过程
请参阅原始模型 "mohammed/whisper-small-arabic-cv-11"
预处理 [可选]
请参阅原始模型 "mohammed/whisper-small-arabic-cv-11"
训练超参数
- 训练方案: 请参阅原始模型 "mohammed/whisper-small-arabic-cv-11"
mohammed/quantized-whisper-small
作者 mohammed
automatic-speech-recognition
transformers
↓ 1
♥ 0
创建时间: 2024-08-30 13:32:41+00:00
更新时间: 2024-09-17 08:06:06+00:00
在 Hugging Face 上查看文件 (15)
.gitattributes
README.md
added_tokens.json
config.json
decoder_model_quantized.onnx
ONNX
decoder_with_past_model_quantized.onnx
ONNX
encoder_model_quantized.onnx
ONNX
generation_config.json
merges.txt
normalizer.json
preprocessor_config.json
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.json