p-groarke / wsay

Windows "say"
BSD 3-Clause "New" or "Revised" License
141 stars 11 forks source link

reader not pausing at start of paragraph #20

Closed bodiegarde closed 5 months ago

bodiegarde commented 7 months ago

I love this reader it helps me with long strings of texts the problem. Im having is it will continuously read without pausing for new paragraphs witch i find is a bit confusing when there is a jump of time in between paragraphs im wondering if

  1. Is there a setting already present to tell the program to take a breath?

  2. Is there some sort of code/ combination of craters to tell the program to hold for X amount of time?

  3. If not, are there plans to add this?

I have tried injecting many things into the text before running it like (... - , : :) but these things that normally indicate a break seem to do little to nothing as the reader is ignoring them any help would be appreciated

p-groarke commented 7 months ago

Hey there, glad you like it :)

Are you reading text from a text file or directly from the command prompt?

At the very least, in file input mode, you should be able to do this with speech xml. However, I was testing it and there seems to be a bug right now. It's not working at the moment. I'll investigate when I have a bit of free time.

You'd want to use <silence msec="500"/> for example (https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ms717077(v=vs.85)). I'll keep you updated, hopefully microsoft didn't break that functionality 🤞

Good day

p-groarke commented 6 months ago

@bodiegarde I'm in the process of doing a big refactor in wsay, so it'll take a little while before I release a new version. In the meantime, I created a hotfix version for you which should parse XML as expected. I've attached it to this issue., let me know if that works :)

To test it : In a text file, you can use speech xml as is. For example, test <silence msec="500" /> test. On the command line, you need to escape the double quotes like this : wsay "test <silence msec=\"500\"/> test"

I hope this fixes your issue, the changes will be part of the next official update. Thx for reporting this!

wsay-hotfix.zip

bodiegarde commented 6 months ago

Sorry for the late response. I just did the test you sent. It appears it will work. Thank you for your help. I'm going to insert this into all my documents where I need it to take a breath. to answer your previous question i'm currently using the clipboard function as i'm working out how to use the txt option as it will probably be easier in the long run.

p-groarke commented 6 months ago

@bodiegarde Glad that works, at least for now. I was thinking about your comment, and whenever I use the tool to speak articles it's always jarring.

I might add a new feature --bookmode, which adds silences every time there is a newline (which would help cadence in your case). Basically it would do this for you. And maybe there's more to do in the future to make the TTS more realistic.

TBD, but I think it'd be cool.

bodiegarde commented 6 months ago

@bodiegarde Glad that works, at least for now. I was thinking about your comment, and whenever I use the tool to speak articles it's always jarring.

I might add a new feature --bookmode, which adds silences every time there is a newline (which would help cadence in your case). Basically it would do this for you. And maybe there's more to do in the future to make the TTS more realistic.

TBD, but I think it'd be cool.

i agree a book mode would be so cool i will be keeping this for life

p-groarke commented 6 months ago

@bodiegarde Hey there, sorry to bother you again.

I'm currently working on text parsing, but I am getting pauses between paragraphs playing copied text. I'm curious if you have an example of text that doesn't work for you?

Maybe you could send me a text snippet and maybe an accompanying wav file so I can debug?

For example, reading this text :

This is a paragraph.
This is another paragraph.

I get the following : out.zip

Is it simply that you find the pause not long enough?

bodiegarde commented 5 months ago

@bodiegarde Hey there, sorry to bother you again.

I'm currently working on text parsing, but I am getting pauses between paragraphs playing copied text. I'm curious if you have an example of text that doesn't work for you?

Maybe you could send me a text snippet and maybe an accompanying wav file so I can debug?

For example, reading this text :

This is a paragraph.
This is another paragraph.

I get the following : out.zip

Is it simply that you find the pause not long enough?

apologies for the extremely late response i got busy with life but here is what i have this clip is from a book i'm writing i'm using the latest version that was available upon our first communication

it appears there is a pause tho it sounds the same as a pause for a sentence 1.zip here is the zip anyways incase you are still digging into this thank you for this amazing program and your time

edit: spellng

bodiegarde commented 5 months ago

i have just downloaded the latest version but have not had the time to try it yet

p-groarke commented 5 months ago

@bodiegarde First off, I wish you the best with your book! That's quite awesome :)

OK so my understanding is that yes, you'd want longer pauses between paragraphs. I will look into it. I have quite a bit on my plate, but I could add a setting to extend the pauses between paragraphs. To be investigated.

Take care

p-groarke commented 5 months ago

@bodiegarde Here's a preview of the next version. I added --paragraph_pause, which will allow you to customize the time between paragraphs. You give it the time in milliseconds. So --paragraph_pause 1000 pauses for 1 second between paragraphs.

Here's an easy command to test, it's kinda horrible but I expect it will only be used when reading text files or clipboard text :)

(echo "Long" & echo."pause.") | wsay --paragraph_pause 1000

wsay-v1.6.2-prerelease.zip

bodiegarde commented 5 months ago

sweet thanks i will investagate. i will keep you updated. have a good day/night.

p-groarke commented 5 months ago

@bodiegarde 1.6.2 has been released with paragraph_pause amongst other things. Enjoy and take care!

bodiegarde commented 4 months ago

@bodiegarde 1.6.2 has been released with paragraph_pause amongst other things. Enjoy and take care!

thank you