Skip to content

Commit

Permalink
add handler for files with spaces in the name
Browse files Browse the repository at this point in the history
  • Loading branch information
hsnfirooz committed Nov 1, 2024
1 parent 63c1e79 commit 8e4627d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/speech2text.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,14 @@ def diarize(file: str, config: str, token: str, result_list: dict):

def main():
parser = get_argument_parser()
args = parser.parse_args()
args, unknown = parser.parse_known_args()

# Join all parts of the INPUT argument to handle spaces
if unknown:
args.INPUT_FILE = ' '.join([args.INPUT_FILE] + unknown)
else:
args.INPUT_FILE = args.INPUT_FILE

logger.info(f"Parsed arguments: {args}")

logger.info(f"Start processing input file: {args.INPUT_FILE}")
Expand Down

0 comments on commit 8e4627d

Please sign in to comment.