Change #1: The existing audio file format checking (in method validate_audio_file) has been moved from the backend script to streetwhisperapp.py. This would allow for more immediate error catching, and reprompt from the user.
Change #2: Added a method called validate_path that checks whether a path is valid. The check is dependent on whether we are calling it for the purpose of checking for a valid file path, or a valid directory path.
Note: In validate_path, probably no need check whether path has the correct permissions (read, write, execute) for now since this CLI is mainly aimed for non-technical folks (the likelihood of paths having custom permissions would be low). Though this might be an enhancement to consider down the road. This of course, is open for discussion
PR Solution to #31
This PR made 2 main changes
Change #1: The existing audio file format checking (in method
validate_audio_file
) has been moved from the backend script tostreetwhisperapp.py
. This would allow for more immediate error catching, and reprompt from the user.Change #2: Added a method called
validate_path
that checks whether a path is valid. The check is dependent on whether we are calling it for the purpose of checking for a valid file path, or a valid directory path.Note: In
validate_path
, probably no need check whether path has the correct permissions (read, write, execute) for now since this CLI is mainly aimed for non-technical folks (the likelihood of paths having custom permissions would be low). Though this might be an enhancement to consider down the road. This of course, is open for discussion