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>
This change merges several separate ItemGroup sections in the Test.csproj file into fewer ones. It improves the structure and readability of the project file without altering its functionality. This will make future updates to the project file simpler and more efficient.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
The MSTest.Sdk package version entry was redundant since it is not being used in the project. This cleanup helps to simplify the package management and reduce potential confusion.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
Consolidate MSTest package versions for simplicity and to avoid conflicts. Removed individual MSTest related references from the project file and centralized the version management in Directory.Packages.props.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>