JarodMica / audiosplitter_whisper

MIT License
93 stars 37 forks source link

Remove trailing spaces and periods #21

Open EthanBlaisAlarms opened 8 months ago

EthanBlaisAlarms commented 8 months ago

Windows doesn't allow file or directory names to end with periods or spaces. I personally ran into an issue where my transcription contained segments such as "Hmm...", which resulted in an error when the script attempted to create a folder with that name with diarization enabled (unsure if this is intentional, but all of the directory names are the actual segment text with the first character chopped off, so in the case of the segment "Hmm...", it created a folder named "mm").

I also discovered another issue where long transcriptions can cause file paths to exceed the Windows limit of 256 characters, also resulting in an error. However, I did not fix that as that is beyond my knowledge but is something that should be brought up.