{"id":418644,"date":"2024-06-30T02:19:24","date_gmt":"2024-06-30T02:19:24","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=418644"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-30T02:19:24","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=418644","title":{"rendered":"<span>Our new public speech synthesis in super-high quality, 10x faster and more stable<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/post_images\/ce8\/83b\/030\/ce883b030dc2c7ee68afcc10f8d5732e.jpg\" alt=\"hero_image\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ce8\/83b\/030\/ce883b030dc2c7ee68afcc10f8d5732e.jpg\" data-blurred=\"true\"\/><\/p>\n<p>  <\/p>\n<p>In our last <a href=\"https:\/\/habr.com\/ru\/post\/584750\/\">article<\/a> we made a bunch of promises about our speech synthesis.<\/p>\n<p>  <\/p>\n<p>After a lot of hard work we finally have delivered upon these promises:<\/p>\n<p>  <\/p>\n<ul>\n<li>Model size reduced 2x;<\/li>\n<li>New models are 10x faster;<\/li>\n<li>We added flags to control stress;<\/li>\n<li>Now the models can make proper pauses;<\/li>\n<li>High quality voice added (and unlimited &#171;random&#187; voices);<\/li>\n<li>All speakers squeezed into the same model;<\/li>\n<li>Input length limitations lifted, now models can work with paragraphs of text;<\/li>\n<li>Pauses, speed and pitch can be controlled via SSML;<\/li>\n<li>Sampling rates of 8, 24 or 48 kHz are supported;<\/li>\n<li>Models are much more stable \u2014 they do not omit words anymore;<\/li>\n<\/ul>\n<p>  <\/p>\n<p>This is a truly break-through achievement for us and we are not planning to stop anytime soon. We will be adding as many languages as possible shortly (the CIS languages, English, European languages, Hindic languages). Also we are still planning to make our models additional 2-5x faster.<\/p>\n<p>  <\/p>\n<p>We are also planning to add phonemes and a new model for stress, as well as to reduce the minimum amount of audio required to train a high-quality voice to 5 \u2014 15 minutes.<\/p>\n<p>  <\/p>\n<p>As usual you can try our model in our <a href=\"https:\/\/github.com\/snakers4\/silero-models#text-to-speech\" rel=\"nofollow noopener noreferrer\">repo<\/a> or in <a href=\"https:\/\/colab.research.google.com\/github\/snakers4\/silero-models\/blob\/master\/examples_tts.ipynb\" rel=\"nofollow noopener noreferrer\">colab<\/a>.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"quickstart\">Quickstart<\/h2>\n<p>  <\/p>\n<p>Here are the non cherry-picked model audio samples:<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/6255213e59ca415fa5d3ad36\" data-style=\"\" id=\"6255213e59ca415fa5d3ad36\" width=\"\"><\/div>\n<\/div>\n<p>  <\/p>\n<p>As usual you can find all of the necessary instructions and models:<\/p>\n<p>  <\/p>\n<ul>\n<li>In our public <a href=\"https:\/\/github.com\/snakers4\/silero-models#text-to-speech\" rel=\"nofollow noopener noreferrer\">repo<\/a>. You need <code>V3<\/code> models;<\/li>\n<li>You can try models directly in <a href=\"https:\/\/colab.research.google.com\/github\/snakers4\/silero-models\/blob\/master\/examples_tts.ipynb\" rel=\"nofollow noopener noreferrer\">colab<\/a>;<\/li>\n<\/ul>\n<p>  <\/p>\n<p>And here is the minimalistic model invocation example:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">import torch  device = torch.device('cpu') torch.set_num_threads(4) speaker = 'xenia'  # 'aidar', 'baya', 'kseniya', 'xenia', 'random' sample_rate = 48000  # 8000, 24000, 48000  model, example_text = torch.hub.load(repo_or_dir='snakers4\/silero-models',                                      model='silero_tts',                                      language='ru',                                      speaker='ru_v3') model.to(device) audio = model.apply_tts(text=example_text,                         speaker=speaker,                         sample_rate=sample_rate)<\/code><\/pre>\n<p>  <\/p>\n<p>You can always list model speakers and symbols via <code>model.speakers<\/code> and <code>model.symbols<\/code>.<\/p>\n<p>  <\/p>\n<h3 id=\"ssml-tags-support\">SSML tags support<\/h3>\n<p>  <\/p>\n<p>We used to limit model input to 140 characters. Now this limitation is lifted. <\/p>\n<p>  <\/p>\n<p>The following SSML tags are supported:<\/p>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th>Tag<\/th>\n<th>Example<\/th>\n<th>Accepted values<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Pause<\/td>\n<td><code>&lt;break time=\"2000ms\"\/><\/code><\/td>\n<td><code>5s<\/code>, <code>500ms<\/code><\/td>\n<\/tr>\n<tr>\n<td>Speed<\/td>\n<td><code>&lt;prosody rate=\"x-fast\"> \u2026 &lt;\/prosody><\/code><\/td>\n<td><code>x-slow<\/code>, <code>slow<\/code>, <code>medium<\/code>, <code>fast<\/code>, <code>x-fast<\/code><\/td>\n<\/tr>\n<tr>\n<td>Pitch<\/td>\n<td><code>&lt;prosody pitch=\"x-high\"> \u2026 &lt;\/prosody><\/code><\/td>\n<td><code>x-low<\/code>, <code>low<\/code>, <code>medium<\/code>, <code>high<\/code>, <code>x-high<\/code>, <code>robot<\/code><\/td>\n<\/tr>\n<tr>\n<td>Sentence<\/td>\n<td><code>&lt;s> \u2026 &lt;\/s><\/code><\/td>\n<td>&#8212;<\/td>\n<\/tr>\n<tr>\n<td>Paragraph<\/td>\n<td><code>&lt;p> \u2026 &lt;\/p><\/code><\/td>\n<td>&#8212;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  <\/p>\n<p>More detailed documentation about supported SSML tags can be found <a href=\"https:\/\/github.com\/snakers4\/silero-models\/wiki\/SSML\" rel=\"nofollow noopener noreferrer\">here<\/a>.<\/p>\n<p>  <\/p>\n<p>You can hear all of the main tags in action:<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/6255b562bec8c05f91290711\" data-style=\"\" id=\"6255b562bec8c05f91290711\" width=\"\"><\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">See main SSML tags in action:<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">ssml_sample = \"\"\"               &lt;speak>               &lt;p>                   \u041a\u043e\u0433\u0434\u0430 \u044f \u043f\u0440\u043e\u0441\u044b\u043f\u0430\u044e\u0441\u044c, &lt;prosody rate=\"x-slow\">\u044f \u0433\u043e\u0432\u043e\u0440\u044e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e&lt;\/prosody>.                   \u041f\u043e\u0442\u043e\u043c \u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0441\u0432\u043e\u0438\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0433\u043e\u043b\u043e\u0441\u043e\u043c,                   &lt;prosody pitch=\"x-high\"> \u0430 \u043c\u043e\u0433\u0443 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0442\u043e\u043d\u043e\u043c \u0432\u044b\u0448\u0435 &lt;\/prosody>,                   \u0438\u043b\u0438 &lt;prosody pitch=\"x-low\">\u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043d\u0438\u0436\u0435&lt;\/prosody>.                   \u041f\u043e\u0442\u043e\u043c, \u0435\u0441\u043b\u0438 \u043f\u043e\u0432\u0435\u0437\u0435\u0442 \u2013 &lt;prosody rate=\"fast\">\u044f \u043c\u043e\u0433\u0443 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e.&lt;\/prosody>                   \u0410 \u0435\u0449\u0435 \u044f \u0443\u043c\u0435\u044e \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0443\u0437\u044b \u043b\u044e\u0431\u043e\u0439 \u0434\u043b\u0438\u043d\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u0432\u0435 \u0441\u0435\u043a\u0443\u043d\u0434\u044b &lt;break time=\"2000ms\"\/>.                   &lt;p>                     \u0422\u0430\u043a\u0436\u0435 \u044f \u0443\u043c\u0435\u044e \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0443\u0437\u044b \u043c\u0435\u0436\u0434\u0443 \u043f\u0430\u0440\u0430\u0433\u0440\u0430\u0444\u0430\u043c\u0438.                   &lt;\/p>                   &lt;p>                     &lt;s>\u0418 \u0442\u0430\u043a\u0436\u0435 \u044f \u0443\u043c\u0435\u044e \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0443\u0437\u044b \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438&lt;\/s>                     &lt;s>\u0412\u043e\u0442 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u0441\u0435\u0439\u0447\u0430\u0441&lt;\/s>                   &lt;\/p>               &lt;\/p>               &lt;\/speak>               \"\"\"  sample_rate = 48000 speaker = 'xenia'               audio = model.apply_tts(ssml_text=ssml_sample,                         speaker=speaker,                         sample_rate=sample_rate)<\/code><\/pre>\n<\/div><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/660571\/\"> https:\/\/habr.com\/ru\/articles\/660571\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/post_images\/ce8\/83b\/030\/ce883b030dc2c7ee68afcc10f8d5732e.jpg\" alt=\"hero_image\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ce8\/83b\/030\/ce883b030dc2c7ee68afcc10f8d5732e.jpg\" data-blurred=\"true\"\/><\/p>\n<p>  <\/p>\n<p>In our last <a href=\"https:\/\/habr.com\/ru\/post\/584750\/\">article<\/a> we made a bunch of promises about our speech synthesis.<\/p>\n<p>  <\/p>\n<p>After a lot of hard work we finally have delivered upon these promises:<\/p>\n<p>  <\/p>\n<ul>\n<li>Model size reduced 2x;<\/li>\n<li>New models are 10x faster;<\/li>\n<li>We added flags to control stress;<\/li>\n<li>Now the models can make proper pauses;<\/li>\n<li>High quality voice added (and unlimited &#171;random&#187; voices);<\/li>\n<li>All speakers squeezed into the same model;<\/li>\n<li>Input length limitations lifted, now models can work with paragraphs of text;<\/li>\n<li>Pauses, speed and pitch can be controlled via SSML;<\/li>\n<li>Sampling rates of 8, 24 or 48 kHz are supported;<\/li>\n<li>Models are much more stable \u2014 they do not omit words anymore;<\/li>\n<\/ul>\n<p>  <\/p>\n<p>This is a truly break-through achievement for us and we are not planning to stop anytime soon. We will be adding as many languages as possible shortly (the CIS languages, English, European languages, Hindic languages). Also we are still planning to make our models additional 2-5x faster.<\/p>\n<p>  <\/p>\n<p>We are also planning to add phonemes and a new model for stress, as well as to reduce the minimum amount of audio required to train a high-quality voice to 5 \u2014 15 minutes.<\/p>\n<p>  <\/p>\n<p>As usual you can try our model in our <a href=\"https:\/\/github.com\/snakers4\/silero-models#text-to-speech\" rel=\"nofollow noopener noreferrer\">repo<\/a> or in <a href=\"https:\/\/colab.research.google.com\/github\/snakers4\/silero-models\/blob\/master\/examples_tts.ipynb\" rel=\"nofollow noopener noreferrer\">colab<\/a>.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-418644","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/418644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=418644"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/418644\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=418644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=418644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=418644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}