joethei / obsidian-tts

Text to speech for Obsidian. Hear your notes.
GNU General Public License v3.0
71 stars 10 forks source link

Fix sometimes skips words #32

Closed rust17 closed 6 months ago

rust17 commented 8 months ago

fix: #2

I’ve taken out the line content = content.replace(/^\S{6}/g, ""); from the code. I’m not certain about the original context in which it was used. My understanding is that this line eliminates the first six non-space characters of each line, potentially leading to the omission of some words during speech. If this modification leads to any issues, please let me know, and I will see how to fix this problem.

rust17 commented 8 months ago

@joethei I think it's helpful. If you think this change useful too, please consider merging this.

joethei commented 7 months ago

That does look like it is the issue, thanks. It was originally indented to remove block references from the spoken output. (as the comment above points out) So, just removing that line is not an option.

Replacing the regex with this: /\^\S*/g should have the correct effect.

rust17 commented 7 months ago

Thanks for your suggestion. The issue was resolved after replacing the regex expression.

joethei commented 6 months ago

Thanks for your contribution, and sorry for letting you wait.