hyperaudio / wordpress-hyperaudio

a wordpress plugin to display interactive transcripts
GNU General Public License v2.0
12 stars 10 forks source link

Unwanted space between words #99

Closed yue-dongchen closed 1 year ago

yue-dongchen commented 1 year ago

This only occurs with the WordPress plugin, not the stand-alone version — So it could be due to styling done by other components of WordPress. I used the faster-whisper software with per-word segmentation option, yielding the following There is no space in the html transcript between them, but peut-être would be shown as peut -être. I tested several WordPress themes.

maboa commented 1 year ago

Hi @yue-dongchen Thanks for logging this. Which format are you converting the data from?

![Uploading Screenshot 2023-08-30 at 12.45.56.png…]()

yue-dongchen commented 1 year ago

Thanks for the reply. It's the JSON output of https://github.com/Purfview/whisper-standalone-win. I wrote a small script to convert it to the HTML shown in the screenshot — no extra spaces. Then F12 on the rendered WordPress page would show spaces between those words. hyperaudio-lite does not yield this issue.

maboa commented 1 year ago

Hi – I'm not sure exactly what Wordpress is doing here. But it might be worth trying putting the spaces at the end of words in the spans, rather than at the end? Also if you view generated source using the browser dev tools, you may get some additional insight. From you examples above, it does seem to be occurring when special characters such as - or ' are used, which may be a clue.

maboa commented 1 year ago

Closing this now as there has been no activity for over a month.