1 Star 0 Fork 1

aurae / FunASR

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
demo.py 567 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhifu gao 提交于 2024-03-06 09:12 . Dev gzf (#1435)
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
# Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights Reserved.
# MIT License (https://opensource.org/licenses/MIT)
# To install requirements: pip3 install -U "funasr[llm]"
from funasr import AutoModel
model = AutoModel(model="Qwen-Audio")
audio_in = "https://github.com/QwenLM/Qwen-Audio/raw/main/assets/audio/1272-128104-0000.flac"
prompt = "<|startoftranscription|><|en|><|transcribe|><|en|><|notimestamps|><|wo_itn|>"
res = model.generate(input=audio_in, prompt=prompt)
print(res)
Python
1
https://gitee.com/bigcash/FunASR.git
git@gitee.com:bigcash/FunASR.git
bigcash
FunASR
FunASR
main

搜索帮助