Remove hard return from text file while making a text to speech audio book?

None-yet

Member
Credits
701
Little bit of background here. I create audiobooks for people who for some reason (blind, learning disability, old age so on) cannot read. I use a pretty good text to speech software.

When I get a request I find the book then I have to convert it to accessible test. Once that is done I only have to input the text file and this software generates an audiobook from it. Problem is, when it reaches the end of a line it has maybe a extra one second delay before it starts back on the next word. This happens in the middle of a sentence or wherever the end of a line falls. I am providing this link I came across while researching a fix to this issue and it can answer most questions I am leaving you with. The point where this delay happens I guess is called a “hard return”.

My question is, using awk, sed, bash or whatever. Does anyone here think they can help me find a way to fix this so I can easily get rid of it. If needed I can post an audio snippet showing what I am talking about. Thanks for reading and considering this issue. I hope we can work a fix!

I am using Kali.
 


JasKinasis

Well-Known Member
Credits
3,291
Little bit of background here. I create audiobooks for people who for some reason (blind, learning disability, old age so on) cannot read. I use a pretty good text to speech software.

When I get a request I find the book then I have to convert it to accessible test. Once that is done I only have to input the text file and this software generates an audiobook from it. Problem is, when it reaches the end of a line it has maybe a extra one second delay before it starts back on the next word. This happens in the middle of a sentence or wherever the end of a line falls. I am providing this link I came across while researching a fix to this issue and it can answer most questions I am leaving you with. The point where this delay happens I guess is called a “hard return”.

My question is, using awk, sed, bash or whatever. Does anyone here think they can help me find a way to fix this so I can easily get rid of it. If needed I can post an audio snippet showing what I am talking about. Thanks for reading and considering this issue. I hope we can work a fix!

I am using Kali.
If you're talking about removing Windows style CRLF (\r\n) return characters, then you can simply use dos2unix on the file.
e.g.
Bash:
dos2unix /path/to/file
That will convert any Windows style CRLF (\r\n) returns into Unix LF (\n) return characters.

If that doesn't do the trick - post a snippet of the affected text and I can work something out.
 


Members online


Latest posts

Top