当前位置: 首页 > news >正文

whisperspeech 英文TTS的实现

以下代码成功运行在 colab 中,需要修改运行时类型为 T4 GPU

!pip install -Uqq WhisperSpeech
def is_colab():try: import google.colab; return Trueexcept: return Falseimport torch
# if not torch.cuda.is_available():
#     if is_colab(): raise BaseException("Please change the runtime type to GPU. In the menu: Runtime -> Change runtime type (the free T4 instance is enough)")
#     else:          raise BaseException("Currently the example notebook requires CUDA, make sure you are running this on a machine with a GPU.")# %load_ext autoreload
# %autoreload 2import torch
import torch.nn.functional as Ffrom IPython.display import Markdown, HTML# check "7. Pipeline.ipynb"
from whisperspeech.pipeline import Pipelinepipe = Pipeline(s2a_ref='collabora/whisperspeech:s2a-q4-tiny-en+pl.model')# pipe.generate_to_notebook("""
# This is the first demo of Whisper Speech, a fully open source text-to-speech model trained by Collabora and Lion on the Juwels supercomputer.
# """)pipe.generate_to_notebook("""
History will not look kindly on House Republicans for their blatant act of unconstitutional partisanship 
that has targeted an honorable public servant in order to play petty political games. Homeland Security Secretary Mayorkas, 
a Cuban immigrant who came to the United States with his family as political refugees, has spent more than two decades serving America 
with integrity in a decorated career in law enforcement and public service.
""")#也可以保存到文件:
# pipe.generate_to_file("output.wav", "This is the first demo of Whisper Speech, a fully open source text-to-speech model # trained by Collabora and Lion on the Juwels supercomputer")
http://www.lryc.cn/news/299912.html

相关文章:

  • P1000 超级玛丽游戏(洛谷)
  • 数据卷的常见命令,如何创建Nginx容器,修改nginx容器内的html目录下的index.html文件
  • CFS三层靶机
  • C语言——oj刷题——获取月份天数
  • Java面试题2024(Java面试八股文)
  • Uniapp(uni-app)学习与快速上手教程
  • 如何开始深度学习,从实践开始
  • PostgreSQL的学习心得和知识总结(一百二十九)|深入理解PostgreSQL数据库GUC参数 update_process_title 的使用和原理
  • 【并发编程】ThreadPoolExecutor类
  • auto关键字详讲
  • 8 scala的伴生对象
  • Redis相关介绍
  • Transformer实战-系列教程13:DETR 算法解读
  • 代码随想录刷题笔记 DAY 25 | 组合问题 No.77 | 组合求和III No.216 | 电话号码的字母组合 No.17
  • upload-labs文件上传漏洞靶场
  • 企业计算机服务器中了mkp勒索病毒怎么办?Mkp勒索病毒解密处理
  • STM32-寄存器和HAL库以及如何使用
  • 手动下载spacy的en_core_web_sm模型
  • Sentinel 流控-链路模式
  • Vue中@change、@input和@blur的区别及@keyup介绍
  • 洛谷: P7910 [CSP-J 2021] 插入排序
  • Lua weak表
  • DS:二叉树的顺序结构及堆的实现
  • python从入门到精通(十九):python的多线程详细使用
  • 【More Effective C++】条款19:了解临时对象的来源
  • 站在C/C++的肩膀速通Java面向对象
  • 【AI视野·今日Robot 机器人论文速览 第七十八期】Wed, 17 Jan 2024
  • flask cors 跨域问题解决
  • 18 19 SPI接口的74HC595驱动数码管实验
  • 计算机网络概述习题拾遗