Ajatt-Tools / impd

🍵 AJATT-style passive listening and condensed audio without bloat.
https://tatsumoto-ren.github.io/blog/passive-listening
GNU General Public License v3.0
40 stars 4 forks source link

Fix timestamp parsing in certain locales (#13) #14

Closed Daja177 closed 1 week ago

Daja177 commented 1 week ago

Description

This pull request addresses issue #13 where the parse_speech_fragments function incorrectly parses timestamps on certain locales on certain systems, such as sv_SE.UTF-8 on Tuxedo OS. The fix enforces a consistent numeric locale by setting LC_NUMERIC=C for the awk command within the function.

Changes

Issue Link

This pull request resolves #13.

Environment Tested

Testing Instructions

  1. Ensure the numeric locale is set to a problematic one (e.g., LC_NUMERIC=sv_SE.UTF-8) on Tuxedo OS or possibly another Ubuntu-based distribution.
  2. Run impd add or impd condense to condense audio from video with subtitles.
  3. Verify that the timestamps are parsed correctly and the process completes without errors, confirming that the override works as intended.