我已经在我的网站上使用JavaScript语音合成语言实现了文本到语音转换器。
HTML:
<div class="article-abstract">
<p>Enterprise service management is all about having all departments in the company define their service delivery processes around a common standard and use the same technology and tool set to deliver those services. This really is the USP of ESM where a company is able to take operational excellence from one department and apply it to achieve greater results in other departments too. This is becoming a trend of late because of the consumerisation of technology and business functions like sales, marketing, HR, facilities management, legal etc looking to deploy technology to deliver their services to their users. </p>
<p>The market size of IT service management itself stands anywhere between $5 bn and $6 bn. And that ESM applies to functions beyond the IT department, it is safe to assume the ESM market size to anywhere between $18 bn and $20 bn. ManageEngine, a division of Zoho Corp, has been a leader in the ITSM space over the last decade with more than 100,000 customers around the world. The flagship ServiceDesk Plus product is available both from the Cloud and as installable on-premises software and this is purpose built for IT service management. ManageEngine’s ITSM product suite also includes products for MSPs, customer support, asset management etc. </p>
</div>
<button id="speakButton">Speak</button>
这工作正常,但所有标点符号也都是一个单词。 例如(。)被读为点。 有什么方法可以克服这个问题吗?
这是完整的代码。
<script>
var text= $('.article-abstract').text();
var u = new SpeechSynthesisUtterance();
u.text = text;
u.lang = 'en-US';
$('#speakButton').click(function () {
speak(text);
});
function speak(text, callback) {
speechSynthesis.speak(u);
}
</script>
的JavaScript
{{1}}