Replaced direct frame rate based conversions with reusable utility methods across multiple subtitle formats. This improves consistency, readability, and maintainability of the codebase.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
Replaced the unused variable 'res' with a discard operator in the PartialResult call to enhance code clarity and maintainability by explicitly indicating the result is not used.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
Encapsulate VoskRecognizer instantiation within a using statement to guarantee resource disposal. This change improves memory management and aligns with best practices for resource handling. Also, maintain the existing logic structure for audio file processing.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
Moved the method `IsDirectoryWritable` from `WhisperAudioToText` to `FileUtil` for better code reuse and maintainability. Adjusted references in `WhisperAudioToText` and `VoskAudioToText` accordingly.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
Enhanced the `DeleteFileAssociationViaRegistry` method to also delete the default registry value associated with the file extension if it matches the given application extension. This ensures a more thorough cleanup of file type associations in the registry.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
Replace the verbose subtitle file type descriptions with shorter, more concise names. This enhances readability and consistency across the codebase by focusing on the essential part of each description.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
Updated InterjectionsRepository to check if the dictionary directory exists before attempting to save files. If the directory does not exist, it will now be created automatically. This change prevents potential errors during file saving operations.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>