首页 > 其他分享 >TTS-Text-to-speech-服务docker搭建-转化文本内容为语音

TTS-Text-to-speech-服务docker搭建-转化文本内容为语音

时间:2024-01-16 09:44:27浏览次数:22  
标签:语音 TTS Text audioPlayer speech https docker

title: TTS(Text-to-speech)服务docker搭建 转化文本内容为语音
tags: [TTS,docker,语音,AI,docker-compose]
新版原文: https://query.carlzeng.top:3/appsearch?q=TTS
版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
date: 2024-01-07 15:12:46
categories: Docker

转化文本内容为语音,TTS,生成中文语音,朗读全文,多语言支持

有什么用

转化文本内容为语音,转化网站内容为语音,朗读,生成中文语音

怎么用

<div> 
<button onclick="synthesizeSpeech()">朗读全文</button>
</div>
<audio controls id="audioPlayer">Your browser does not support the audio element.</audio>      
<script>
  function synthesizeSpeech() { 
    var inputText = document.getElementsByClassName('post-block')[0].innerText;
    var voice = "ZH";
    var url = 'https://tts.carlzeng.top:3/speech?text=' + encodeURIComponent(inputText) + '&voice=' + voice;
    var audioPlayer = document.getElementById('audioPlayer');          
    audioPlayer.src = url;
    audioPlayer.load();
    audioPlayer.play();
  }
</script>
  1. 把以上这个html内容加到html页面中(或者模版中)
  2. 编辑/修改一下inputText的内容来源为需要朗读的文本内容。

实现过程

TTS docker, eSpeak TTS server for WebSpeech

方案有许多,但都不够亲民,或者不支持中文普通话

https://github.com/synesthesiam/opentts
docker run -it -p 5500:5500 synesthesiam/opentts:zh --no-espeak
弊端:不支持中文,无法包含英语

预览全流程 Setup a Text to Speech Engine(ON YOUR COMPUTER)

新的方案:

Text-to-speach server
https://github.com/parente/espeakbox

http://192.168.6.203:8089/speech?text=排查Nginx Proxy Manager,反向代理,让网站变成HTTPS&voice=ZH

Text-to-speach server
https://github.com/parente/espeakbox

Docker的具体位置

https://hub.docker.com/r/parente/espeakbox

标签:语音,TTS,Text,audioPlayer,speech,https,docker
From: https://www.cnblogs.com/backuper/p/17966923

相关文章

  • 【论文阅读笔记】【OCR-End2End】 TextFormer: A Query-based End-to-End Text Spotte
    TextFormerarXiv:2306.03377读论文思考的问题论文试图解决什么问题?写作背景是什么?问题:如何设计一种更好的query-based的方法来同时实现端到端的场景文本检测能否利用弱监督数据(只有文本)进一步增强端到端模型的文本识别能力?背景:目前的端到端场景文本检测识别......
  • Text Intelligence - TextIn.com AI时代下的智能文档识别、处理、转换
    一、智能文档处理介绍在AI时代,智能文档处理技术正变得越来越重要。它包括了智能文字识别(OCR)、智能文档信息抽取、文档图像处理以及文档转换等多个方面。这些技术共同构成了现代信息处理的核心,广泛应用于数据分析、自动化办公、数字化存档以及更多其他领域。智能文字识别(OCR)智......
  • itextsharp upgrade to itext7
    WhyamIgettingduplicatepagesextractedfromiText7C#?Actuallyitisnotthesametextbeingreturnedfromsequentialpages.Insteadyougetthetextfrompage1whenyouextractpage1;thetextfrompages1and2whenyouextractpage2;thetext......
  • flutter TextFormField
    TextFormField(maxLength:20,controller:controller.shippernameController,decoration:InputDecoration(counterText:'',//计数器的显示border:InputBorder.none,fillColor:Colors.white,filled:true,is......
  • TextDiffuser-2:超越DALLE-3的文本图像融合技术
    概述近年来,扩散模型在图像生成领域取得了显著进展,但在文本图像融合方面依然存在挑战。TextDiffuser-2的出现,标志着在这一领域的一个重要突破,它成功地结合了大型语言模型的能力,以实现更高效、多样化且美观的文本图像融合。Huggingface模型下载:https://huggingface.co/JingyeChen22/t......
  • ERROR tls.obtain will retry {"error": "[ttshhb.org] Obtain: [ttshhb.
    这个错误提示表明Caddy在尝试自动获取TLS证书(通常通过Let'sEncrypt)时遇到了问题,具体是域名ttshhb.org的授权验证失败,并返回了HTTP0状态码。HTTP0状态码通常是网络连接问题或服务器端未响应的情况。在Let'sEncrypt的ACME协议中,获取证书需要进行DNS验证或HTTP/HTTPS验证,如果在执......
  • textarea 添加回车和 ctrl+回车快捷键
    <!DOCTYPEhtml><html><head><title>WebSocketDemo</title><style>body{margin:0;padding:0;height:100vh;display:flex;flex-direction:......
  • FAQ002 设置RichTextBox的字体
    要将文本颜色设置为红色并加粗,可以使用Font类中的Bold属性来将字体加粗。下面是一个示例:yourRichTextBox.SelectionColor=Color.Red;yourRichTextBox.SelectionFont=newFont(yourRichTextBox.SelectionFont,FontStyle.Bold);在这个示例中,yourRichTextBox是一个指向......
  • EF CodeFirst mysql 迁移异常Unable to create a 'DbContext' of type
    问题过程终端执行dotnetefmigrationsaddinit出现如下错误:Pomelo.EntityFrameworkCore.MySqlMicrosoft.EntityFrameworkCore.ToolsUnabletocreatea'DbContext'oftype''.Theexception'Methodnotfound:'VoidCoreTypeMappingParameters......
  • Spring的ApplicationContext核心分析
    跟着孙哥学Spring,b站:https://www.bilibili.com/video/BV185411477k/?spm_id_from=333.337.search-card.all.click1.AnnotationConfigApplicationContext执行过程publicstaticvoidmain(String[]args){AnnotationConfigApplicationContextctx=newAnnotationConfig......