305 comments found.
Please switch to WaveNet voice.
I switched to WaveNet Voice. I can generate audios again, however there are a lot of pronunciation problems that weren’t there before.
On the Google site (https://cloud.google.com/text-to-speech?hl=fr) they are not present, so it’s from the plugin.
Do you know about these problems? Are they being solved?
Thanks for your help,
Kind regards,
there was no problem with previous version. Is it possible to download one somewhere to try?
Can you provide us specific phrases or words via help@merkulov.design that sound correct on a Google test but not in the plugin? We will test them and see how we can fix this.
done thanks you
Hello,
I switched to neural voice and I can’t generate voices anymore. I have this error message:
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
I tried to change many parameters but nothing works. Could you please help me?
Hello! Indeed there may be problems using the Neural French voice in certain conditions(maybe when using some symbols or characters) and we can’t say more specifically about the reasons. It happens even when testing a certain text on the Google demo https://cloud.google.com/text-to-speech#section-2 Since these Neural voices were added recently, there may still be some problems with them on Google side. You can report the bugs with your text example via https://cloud.google.com/support/docs/community-support
I have spent many days working around the limitations of Google TTS in vocalising French. The main problem (besides some incorrect pronunciations) was the treatment of slurs, often far from (academic) usage. To achieve it, I introduced a large number of rules. French speakers can listen to an example on my page https://lebonheurestpossible.org/vitamine-d/ and read its conversion trace: https://lebonheurestpossible.org/wp-content/uploads/speaker/post-453.txt (to be viewed in UTF8).
However, this required solving two problems: (1) the correct handling of Unicode and (2) soft hyphens. Here are the explanations:
1) I had to modify a line (circa 1950) in SpeakerCaster.php by replacing
$post_content = preg_replace( $expressions[ $i - 1 ], $exp, $post_content );
with:
$post_content = preg_replace( $expressions[ $i - 1 ]."u", $exp, $post_content );
The trick is the “u” option forcing preg_replace() to read the source and target as UTF8.
2) Soft hyphens (https://wikimass.com/html/entities/soft-hyphen) are obviously of no use for interpreting French. Google does perfectly well with (French) texts that are not pre-segmented. On the other hand, the “shy” code inside a word prevents its recognition in a regular expression. It is therefore necessary to eliminate these soft hyphens, and to do this, introduce the simple rule:
/\x{00AD}/
(Second line must be empty!)
Note that I could do all of this owing to the tracing which I had implemented: three simple patches in SpeakerCaster.php version 3.4.3. See point 1 of the note I sent to the technical team: https://lebonheurestpossible.org/wp-content/uploads/notes.txt
I will follow updates of this plugin once the tracing mechanism has been integrated.
Hello! Thanks for your time and detailed explanation. Unfortunately, we do not have staff with perfect French knowledge so that we can properly check this and make the appropriate fixes. Moreover, it would be great to solve this at the Google level and thus improve the pronunciation of French for all users text to speech options feature not just for Speaker. For this, you can report problems here https://issuetracker.google.com/savedsearches/5235428 or via support center
Hello,
I am afraid you missed my points…
The issue(s) I raised are with SPEAKER, not with Google’s modelling of French language. Google’s machine-learned model can’t be universal because every language has its specific rules that depend on usage, topics and modes of discourse. Therefore, to work in the “real world” (beyond demos) we need to adapt the conversion to the topic and lexicon of the website, a thing we can do via replacement patterns (i.e. regex rules) in SPEAKER’s settings. A wonderful feature!
In French, many rules deal with acceptance/rejection of liaisons — https://en.wikipedia.org/wiki/Liaison_(French) — but every language has its own specificities. I am not expecting a version of SPEAKER that would be customised for French; on the contrary, I am aiming at a more universal and designer-friendly version.
My first suggestion was to add the ”/u” suffix systematically to regex rules so that the target pattern will correctly be found in every occurrence. Indeed, webmasters conversant with preg_replace() can also append it themselves after the first line of each pattern.
Suppressing soft hyphens would also make life easier to the ones who haven’t yet figured out the elimination of /\x{00AD}/. The more so, if they work with “blind” (no-trace) versions of SPEAKER (3.4.2, 3.4.3).
Again, I am submitting a list of suggested updates, now in a better presentation that will be regularly updated:
https://lebonheurestpossible.org/suggestions-for-speaker/I am proud to announce that, owing to 390 replacement patterns (AND usage of TRACE on my patched version), 68 posts/pages of my web site (https://lebonheurestpossible.org) have produced satisfactory audio versions. I am now reading every page carefully and updating rules accordingly.
Frankly, I am not eager to downgrade my patched SPEAKER 3.4.2 version to any “update” that would not integrate the Trace feature (only 3 small patches) and solve a few issues raised in my report.
Meanwhile, I am keen to check websites in French with mature vocal transcriptions using SPEAKER. Ready to share regex rules with their webdesigners.
Hello, thanks for tirelessly providing details to improve the Speaker. The points 3(SOFT HYPHENS) and 9(LANGUAGE-SPECIFIC REPLACEMENT PATTERNS) will be added in the next version of the plugin. The points 6 and 10 will be added in future updates. The points 2,4,7 cannot be reproduced or fixed for technical reasons. The point 1,5,8 will be considered in the futere.
Excellent news!
Point 1 could be fixed very quickly if you look at patches on the file I sent you… And it is essential for designers of replacement patterns.
Thanks but the solution with text files is not acceptable to us, so we will use another way.
Amazing plugin. Full-featured … and it works!
I know I can add pre-roll and post-roll “audio ads” using the “Before Audio” and “After Audio” fields. But do you know of a way to programmatically add pre-roll/post-roll/mid-roll advertisements within the MP3s that Google generates?
Hello! There is a way to add pre-roll/post-roll/mid-roll features but with some restrictions. This can be considered as a custom service. Please contact us via help@merkulov.design for details If you are interested.
There is a bug which I quickly fixed in SpeakerCaster.php:
If the title of an article or page contains a sequence of caps, for instance “Lecture automatique (TTS)”, it is likely to be tagged as follows:
Lecture automatique (<span class="caps">TTS</span>)
The result is that the content or “aria-label” contains these tags, including their quotes which mess up the code and results in a wrong display of the player.
This is very easy to fix: in 3 places of SpeakerCaster.php, replace variable ”$title” with:
preg_replace("/<\/?[^>]*?>/u",'',$title)
Usually, themes created according to the WordPress codex escape the html code in the titles except for some tags. Based on this, the Speaker works as expected. Therefore, if the problem is related to the use of markup in the title, this is the theme territory. We would recommend you use theme filters, or we can add a filter before the $title variable that you could call in the theme’s function.php, and change the html in the title according to your need. So, please let us know if you need a filter before the $title variable and we will add it in the next plugin update
The “span class=’caps”” tag in titles is not produced by my theme, but by the “wp-Typography” plugin. So, modifying “functions.php” wouldn’t work. I understand that the “filter” is nothing else than the preg_replace() which I indicated above. And this will be very easy to add that filter to “SpeakerCaster.php”: only 3 occurrences.
If you use this plugin https://wordpress.org/plugins/wp-typography/#description , then the filter should work (which we will add to the Speaker if you require it). For example, here is a title filter here https://plugins.svn.wordpress.org/wp-typography/tags/5.8.1/includes/wp-typography/components/class-public-interface.php on line 239. If you write to function.php your own filter and call it later, it will impact the changes that the plugin made.
If this solution does not suit you please contact us by help@merkulov.design and provide a step-by-step guide to reproduce the problem on our end or your website staging copy access with the settings on which the problem occurred to consider it in more detail. We cannot add changes to the code at the user’s request without any check.
I (we) certainly need to filter out HTML tags from titles in Speaker. This does not require installing a filter, since a single preg_replace() does it: only put it in 3 places in SpeakerCaster.php, I have done this patch on my version.
It wouldn’t be a good idea to ask web designers (your clients) to modify other plugins or themes while the problem is so easily solved by Speaker.
Indeed, I could set wp-Typography to avoid wrapping acronyms between “span class=’caps’” tags, but this wrapping is used for other purposes, among which identifying acronyms in regex rules.
Hello! What the way to reproduce your issue on my side?
Just install wp-Typography, make sure that option for wrapping acronyms between “span class=’caps’” tags is active, then publish a post with a title containing an acronym and try to create its player.
Sorry, no issue on my side with “wrapping acronyms” enabled. Are there any other settings I need to make, or plugins(themes) I need to activate to reproduce this?
Can you tell me the URL of your test page?
My test page for this was:
Lecture automatique (TTS)
https://lebonheurestpossible.org/tts-fr/It works because I patched SpeakerCaster.php with these calls of preg_replace():
preg_replace("/<\/?[^>]*?>/u",'',$title)
You can see in my page’s code (line 3467) that “TTS” is wrapped in “span class=’caps’” tags. Just below (line 3480) you can see:
aria-label=”Audio of Lecture automatique (TTS)”
which means that the “span” tags have been removed, failing to which there would be a mess with quote signs.
It might take ages to figure out which other 3d-party plugins/themes create or fix this problem. I strongly recommend to fix it at the level of Speaker to prevent such (and similar) cases from happening, as it would make your clients feel very confused. To fix it, you only need to replace ”$title” with exactly the preg_replace call which I reproduced above. This took me less than 2 minutes to patch SpeakerCaster.php…
Incidently, this morning my page “Lecture automatique (TTS)” was no longer displaying any player (by Speaker, by Meks, nor default). After a long enquiry I found out this was due to having set “Enable the caching mechanisms” in plugin “CM Table Of Contents Pro”. I don’t have an explanation for this. Anyway, it’s not Speaker’s fault since the display failed for alternate audio players.
To make things clear, in SpeakerCaster.php you need to replace line 89:
return str_replace( '<audio ', '<audio aria-label="' . esc_html__( 'Audio of', 'speaker' ) . ' ' . $title . '"', $html );
with:
return str_replace( '<audio ', '<audio aria-label="' . esc_html__( 'Audio of', 'speaker' ) . ' ' . preg_replace("/<\/?[^>]*?>/u",'',$title) . '"', $html );
and do the same in two more similar occurrences of $title.
Solved! Thank you for paying attention to this issue.
Hello! It seems that there is a bug in the design of the player.
On my site, it is partly hidden by the text of short posts (such as https://lebonheurestpossible.org/travaux-recents-sur-le-sommeil/) whereas it looks fine on longer ones such as https://lebonheurestpossible.org/une-education-du-sommeil/.
The bug is an unwanted extra
in the code reproduced below. It is there whatever design has been choosen. The code: <pre><div class="desktop"> <div class="mdp-speaker-wrapper"> <div class="mdp-speaker-box shortcode speaker-chrome"> <div data-download="1"> <audio aria-label="Audio of Travaux récents sur le sommeil" class="wp-audio-shortcode" id="audio-2211-2" preload="metadata" style="width: 100%;" controls="controls"><source type="audio/mpeg" src="https://lebonheurestpossible.org/wp-content/uploads/speaker/post-2211.mp3?cb=1673623192.mp3&_=2"><a href="https://lebonheurestpossible.org/wp-content/uploads/speaker/post-2211.mp3?cb=1673623192.mp3">https://lebonheurestpossible.org/wp-content/uploads/speaker/post-2211.mp3?cb=1673623192.mp3</a></audio> </div> UNWANTED ====>>> </div> <div class="mdp-speaker--speed speaker-chrome"> <div class="mdp-speaker--speed-title"> <p>Vitesse de lecture :</p> </div> <div class="mdp-speaker--speed-box"> <button class="mdp-speaker--speed-button" aria-label="0.75x speed" title="0.75x speed" data-speed="0.75">0.75x</button> <button class="mdp-speaker--speed-button" aria-label="1x speed" title="1x speed" data-speed="1">1x</button> <button class="mdp-speaker--speed-button" aria-label="1.25x speed" title="1.25x speed" data-speed="1.25">1.25x</button> <button class="mdp-speaker--speed-button" aria-label="1.5x speed" title="1.5x speed" data-speed="1.5">1.5x</button> </div> </div> <p></p><p></p> </div> </div>/<pre /></pre>
There was a bit of a mess in the “pre” section above, but the unwanted closing “div” tag is clearly indicated.
I confirm that the problem is this unwanted closing “div” tag. To check it, I replaced the [speaker] short code with the fixed HTML code on this page which now displays the player properly:
https://lebonheurestpossible.org/tts-fr/Sorry for the disruption !
The solution I suggested above only worked in a few particular cases… I finally figured out why the display of this player is not correct on short pages/posts: the culprit is wp-Typography, an excellent typography plugin which modifies the shapes of quotes and inserts non-breaking spaces etc. in compliance with language-specific typographic rules. This plugin is almost indispensable when publishing in French…
The solution is to go to the general settings of wp-Typography and add “mdp-speaker-wrapper” to the list of classes that should be excluded from its modifications.
The solved most of my problems, except the incorrect display of the player at the bottom of post : https://lebonheurestpossible.org/des-glaces-pleines-de-vide/
Hello! I’m glad you were able to figure out the issue. As for the incorrect display of the player, it looks like some third party plugin adds the styles https://take.ms/XLDbU for the Speaker using a script since this is not our CSS.
Yes! Probably a bad trick played by our (obsolete) “Times” theme, as it only affects short texts. Fortunately, I now implemented Meks Audio Player as a work-around, until you supply a floating/sticky variant of the player… Meks is ugly but efficient.
Hello! If you convert “30 – 20 = 10” in English, it says correctly “thirty minus twenty equals 10”. But if you do the same in French it says “trente m-i-n-u-s vingt égale 10”. This means that the French TTS does not recognize the “–” glyph which is then converted to non-basic ASCII coded “U+2013.” May be simply send ’-’ to Google? I guess the issue lies with Google, not SPEAKER, although it might point to a bug in the plugin. I found very few mistakes in French TTS which I was able to bypass using regex rules… This plugin is amazing!!!
Hello! Thanks for your attention to detail, we noted it and will follow it. I don’t think there can be any universal solution as the ”-” can be used in different cases. We’ve tested this on Google voice synthesis services and there is such a problem as well.
This confirms my guess that this problem belongs to Google.
Hi there. Did you created plugin (you mentioned that in this comment section) that supports Microsoft integration of text-to-speech? Since I see only Google is supported, but Google doesn’t offer my language.
Hello! We do not plan to include Microsoft support for the Speaker. A new plugin based on Microsoft will be created in the near future.
Hi there, I purchased this few days ago and activated it today. but I couldn’t find ‘Post Types’ menu on the admin panel. Also there wasn’t icons for managing speech templates on the speaker block(right sidebar). Is there anything I have to do more?
Also in my downloaded’s package, there was not included ‘Speaker Utilities’. Where can I get it?
other things, I can’t find ‘Create Audio’ for batch processing on the All Posts admin page.
Hello! The Speaker Utilities plugin should be installed automatically after the Speaker activation via your purchase code. Once the Speaker Utilities is activated the full functionality of the plugin including post type, bulk generation, and custom templates will be available. If the problem still exists, please contact us via help@merkulov.design and provide your site access details to look at the issue.
I sent email. please, check it. Thanks
Got it and replied
this is a problem : https://ibb.co/Nn2Jtqq
The voice seem to be different
Hello! Thanks for letting us know. For some reason, we get several languages with the same name from Google. It will be fixed in the next plugin release.
This text is not visible on a smartphone
But is doesn’t work with:[speaker]
The speaker remains visible… How can I get around this?Sorry, code disappeared on my comment! I had written [speaker] inside paragraphs tagged with id=”desktop”…

I’m glad you were able to manage it.
I have just upgraded from 3.4.1 to 3.4.2, and reactivated successfully. Apparently, SSML codes (such as voice change) are no longer executed. Besides, there is no (more?) a file such as wp-content/plugins/speaker/SpeakerUtilities.php
Hello! Please try the further trick: delete your purchase code in the plugin settings>Save> go to Speaker>Updates>press Clear cache and then paste again your purchase code.
Unfortunately, it did not change the result, even after deactivating and reactivating Speakable Markup.
Again, “speaker.php” tells (line 474): activate_plugin( ‘speaker/SpeakerUtilities.php’ ); yet there is no “SpeakerUtilities.php” file in the package, and not even a “speaker” subfolder at the same level…
Besides, in the previous versions I had noticed a “Speaker Utilities” plugin among Wordpress extensions, but after upgrading it disappeared. This might be part of the explanation…
I got around this problem replacing
with
<voice name=”fr-FR-Neural2-C”>
as suggested by Raydianze (8 days ago)…
I think there is a lack of documentation about supported/unsupported SSML codes. I haven’t yet tried the ones controling prosody, pauses etc.
Hello! The problem with the “Speaker Utilities” removal may occur when the plugin is manually updated (via FTP). That is, it is better to update the plugin through the admin panel. In any case, we will consider the causes of such a problem. https://docs.merkulov.design/speech-synthesis-markup-language-ssml-in-the-speaker-wordpress-plugin/
For now, please contact us via help@merkulov.design and we will provide you with the missing “Speaker Utilities” file so you can add it to the plugin and get all the Speaker functionality including support for all the listed shortcodes https://docs.merkulov.design/speech-synthesis-markup-language-ssml-in-the-speaker-wordpress-plugin/
speaker-sub, speaker-emphasis // these are NOT working correctly! As per your documentation. HELP!
[speaker-voice name=”en-GB-Wavenet-A”] ALSO DOES NOT WORK! it is speaking the “speaker-voice name….. and NOT correctly changing to the selected voice type. |span speaker-voice=”en-US-Neural2-D”| ALSO DOES NOT WORK!
Hello! Please make sure the Speaker and Speaker Utilities are activated. If so, contact us via help@merkulov.design and provide your site/staging copy admin access to consider the issue in more detail since we can not reproduce it on our side.
Everything is correctly activated and registered… I do not have a public facing staging site because I develop everything on localhost. Take a look at Shortcodes.php … it is dated 08/12/2021 … It does NOT contain those shortcodes as per your documentation! I am using the 3.4.1 version
Not all shortcodes are in the Shortcodes.php file. For example [speaker-voice name=”en-GB-Wavenet-C”] is in the wp-content/plugins/speaker/SpeakerUtilities.php in line 250. So, If the plugin is activated https://take.ms/lqxrF , then the shortcodes work correctly. We’ve checked and everything works correctly on our side.
I’m sorry, but there are always problems and it’s an incredible waste of time. You want to provide paid support even for very simple functional errors? The following are purely plugin errors.
1- When I choose one of the rounded types, only the blue part of the player comes and the play etc parts are not… 2- I can’t change the background color of the player (wordpress player) in any way 3- I can’t turn off the audio download part 4- my sound settings are not reflected
do you really have a solution? I don’t have any more time!
1. The problem with the player display may be due to disabled media elements in the theme https://stackoverflow.com/questions/25436646/media-element-js-and-wordpress-usage. To answer more precisely, we need to look at the problem on your site. For this, switch the player to blue and provide your direct page link.
2. By choosing the WordPress or browser default player, you thereby refuse any customization and use the Default one. In this case, the color settings are not displayed.
3,4. Make sure all caching plugins and settings are disabled when configuring plugins. It would be better to use it after finishing all setting up work.
I add a player with a shortcode on a loop, archive or a page with multiple posts. But the serious problem is that while one sound is playing, the previous one does not automatically stop when another sound starts. Voices overlap. This single page is valid both in the topic and in related posts. I might want to use the shortcode, that is the player.
What solution does it have? Thank you.
We have already mailed you.
Thanks. I replied.
I would like to ask a few questions before buying.
1- Can we add a button to the post loop and single page with a shortcode or a similar method? 2- Can we store the recorded sounds on our own server? I guess after the first listen the sound is recorded and on the next request the mp3 file on our own server is played? Google api is not needed again in the 2nd request?
Hello! 1. Please specify which button do you mean. If you mean an audio player you can add the player for a specific post using the shortcode https://docs.merkulov.design/speaker-wordpress-plugin-settings-2/#design
2. Audio files are saved in the Media Library or Media library + Google Drive https://take.ms/1mfDx. Each time you Create or Re-create audio for your posts, a certain number of characters are subtracted from your quota. The characters are only counted during audio generation and it does not matter how many times users/visitors listen to the generated audio.
I want to make a specially designed stop/play button, not a player. And I want to put it inside the post loops in the sample archive file. Thus, this button will appear and run automatically at the top of each article. Please check the image for sample code.
https://freeimage.host/i/HnCfAT7For now, you can only display the player (not the button) using the speaker shortcode in your loop. After that, the player can be customized with css and js to get a play button. We can offer this feature as a custom service. If you are interested, you can contact us via help@merkulov.design for details.
Hello! The WordPress universe has a lot of themes and plugins created by different authors. We cannot check our product for compatibility with each plugin or theme. However, you can be sure that our plugins crafted following all rules and standards of WordPress development. And they should not cause any compatibility problems with other plugins and themes made according to WordPress standards.
does this work for custom post type?
Hello! Yes, it supports custom post type.
is it support hebrew ?
Hello! All available languages and voices are here https://cloud.google.com/text-to-speech/docs/voices
very frustrated with this plugin keep say plugin not activated, tried to activate and working again, then it says not activated which happen randomly, fix again, then problem again and everytime I deactivate I will lose the settings and previous audio not working, keep trying again and again. I am giving up on this plugin.
Hello! Please make sure you use the latest plugin version(3.4.1). If the problem persists, please contact us via help@merkulov.design and provide your site access details to consider the issue more detail.