DEV Community

Cover image for Text to speech, It's so easy !
Alex Ma
Alex Ma

Posted on

Text to speech, It's so easy !

original article

Hello, everyone, I am Maik. In the past two days, I have been studying the function of text-to-speech. Sometimes I am worried that my speech is not standard. For example, if I want to record a video, improvisation may get stuck. At this time, we can prepare the text first and then use artificial intelligence to generate audio. Let's share my research results below!

Text To Speech

I use the recently popular WebRTC_API to record

Use

chrome install tampermonkey

install scripts

Step 3: Enter the text you want, click play first, and then click start to record, click stop recording, and then you can download the audio file.

Microsoft's TTS  demo

Summary

1、Currently, due navigator.mediaDevices.getDisplayMedia() Can't directly record the sound of the computer,The computer must put the sound outside and then record, so the recording needs to find a quiet environment.

2、Sometimes the network speed is not good and may get stuck. You need to find a better network,

The above is the whole content of this article. I hope this article will be helpful to everyone. You can also refer to my previous articles or exchange your ideas and experiences in the comment area. Welcome to explore the front end together.

[1]Alibaba Cloud speech synthesis: https://ai.aliyun.com/nls/tts

[2]Speech synthesis of Tencent Cloud: https://cloud.tencent.com/product/tts

[3]Microsoft's TTS: https://azure.microsoft.com/zh-cn/services/cognitive-services/text-to-speech/#overview

[4]Microsoft's TTS documentation: https://docs.microsoft.com/zh-cn/azure/cognitive-services/speech-service/speech-synthesis-markup?tabs=csharp#specify-paragraphs-and-sentences

[5]My script address: https://greasyfork.org/zh-CN/scripts/440926-微软tts-录音插件

Top comments (0)