teleshoes / ebook-audiobook-wordtiming

0 stars 1 forks source link

Add additional mode to list 'cr3', 'pandoc': 'cr3-sentenceinfo' #2

Open plotn opened 1 year ago

plotn commented 1 year ago

Hi Elliot! I am finishing preparing of publication on habr.com and have some issues:

Can you implement additional mode - parameter 'cr3-sentenceinfo' - in order not to parse document via cr3 or pandoc but to use previously generated file (I will make sentence info from within android and then copy it to my ubuntu, now I cannot do this without code modifications)

plotn commented 1 year ago

or maybe call it cr3-si-path

teleshoes commented 1 year ago

again, why not just use cr3 on linux? its MUCH easier to compile than the android version...

i might implement something like you want. i might instead add a cli option to manually cache a sentenceinfo file, like ebook-audiobook-wordtiming --store-cr3-sentence-info somebook.epub abc.sentenceinfo ebook-audiobook-wordtiming --cr3 somebook.epub 1.mp3 2.mp3

plotn commented 1 year ago

I told you I could not run cr3 in this mode in my ubuntu, so can I ask you for this mode just for me? It really helps cli option is good enough too, it will solve my problem, sure

teleshoes commented 1 year ago

well, you dont need to run the qt gui, you know. you just compile it, and run cr3 --get-sentence-info ebook.epub

this is my build script, in the root of cr3

echo BUILDING \
  && rm -rf build/ \
  && mkdir build/ \
  && cd build/ \
  && cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. \
  && make clean \
  && make -j8 \
  && sudo make install \
  && cd .. \
  && rm -f cr3qt/src/i18n/cr3_*.ts \
  && git checkout cr3qt/src/i18n/cr3_*.ts \
  && echo DONE

are you getting an error with cmake?

plotn commented 1 year ago

I wrote you alredy - some errors with fonts etc, maybe you forgot, I forgot where too - maybe in coolreader thread

plotn commented 1 year ago

See issue#1 please - in the end - it s there

teleshoes commented 1 year ago

right, yes forgot about it, thanks!

1) it is odd that you have no truetype fonts installed in any of the dirs searched. maybe install package fonts-freefont-ttf? 2) i dont think the segfault you experienced in KR is related to not finding any ttf fonts. unlikely, but perhaps one of the paths is to a dir that doesnt exist? 3) please try this: use cr3, not kr. try installing a ttf file. if you still get that error, remove line 352 in file cr3gui/src/cr3qt.cpp the line in question is: return 2;, and it happens when no font files can be read. presumably there is similar code in KR that you already skipped and replaced with 'print continuing...'.

plotn commented 1 year ago

As for me it would be simplier just add --use-sentenceinfo-file /path/to/file I already can save sentenceinfo file from KR from android, it works well. But I'll try, a little bit later. Thank you

plotn commented 1 year ago

And there will be publication , i hope interesting, i will send you, possibly we could translate if you are interesting. There are a couple of my publications at russian habr.com web site - you may see by plotn1 nickname

teleshoes commented 1 year ago

cool. ill just google translate it when its up. thanks!

plotn commented 1 year ago

Hi! Here is it: https://habr.com/ru/companies/rostelecom/articles/763018/