1

I have several scripts that need to be converted to generated (TTS) voice overs. Except for certain parts, which should remain in the text, but not be recorded in the audio.

I'm using Balabolka, which provides a great many features, except for the sparse documentation and lack of official or community support.

I've found I can do one-line comments if add them as an attribute of a SAPI tag: <silence msec="50" txt="This'll be but a breath." />

Or a fake XML tag: <comment txt="This is totally a comment." />

Or even: <http://dontread.me>

This even works for blocks of text, which is what I need:

<
It grows in bunches,
I've got my hunches
>

Except, whenever the text inside the tag contains any end-of-phrase punctuation ([.?!]), an empty line, or a space at the start, it seems Balabolka will split the tag and the text after the split will be read, so with this:

<
It's the best!
Beats the rest.
>

Beats the rest is read. Even if I remove the exclamation, the dot will make that last > be read as comma.

Worse, I want to enable Start a new phrase after line breaks in the Reading parameters, since without it titles, lists and other text with no end punctuation is read without pause. But if I enable it, then single-line comments with punctuation break, and every new-line will also break the silence, making multi-line comments impossible. And after I disable it Babaloka glitches and will throw a XML parser error on any punctuation.

So, I could massage all my text to work around the glitches, but I'd rather not... it would be much easier with a working comment tag, in Balabolka or another app.

Thanks for any pointers.

1

Ilya (the developer) graciously provided an answer:

Now I don't plan to create an advanced XML parser for Balabolka (with support of comment symbols also). Sorry.

I can advice you not to comment, but to remove the unnecessary text from a document (try to create 2 variants of text - to read aloud and to view).

Or you can add the new rule to the pronunciation correction dictionary: the special regular expression to find comments.

Find what (like regular expression):

/\*(.|[\r\n])*?\*/

Replace with:

(empty line)

Apply rules to text before to convert it to audio file (the main menu item "Options|Pronunciation Correction|View Modified Text").


The tip: it is recommended to open an angle bracket and to close an angle bracket inside the same paragraph. Also, try to place the starting tag and ending tag in the same way. This will increase the possibility for Balabolka to process tags correctly.

He favours C-style comments (/* ... */). The regex can be adapted and quickly tested by prepending it with %rex% in search or replace (v.g. %rex%/\*(.|[\r\n])*?\*/.

Thanks so much Ilya!

--

Update: I stuck to my XML comments:

<bit.ly/asdf>
<silence msec="4000" text="Chapter 2" level=2>
<screen only text="Sources:
    1. Foo
    2. Bar" />

and added a pronunciation correction to read text="([^"]|\n\r)*?" as nothing. I then:

  1. Copy the original text from Word or Writer (Balabolka's import doesn't handle versioning)
  2. Apply auto-format (Control+F)
  3. View corrections (Control+T)
  4. Copy the corrected text and replace the uncorrected one (or else the XML parser still breaks the tags, and corrections are not shown in subtitles)

and I'm all set!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.