343 else:
344 # different warning message depending on the problem (or both messages)
345 if num_channels != 1:
346 logger.warn(347 "Resampling to one channel since {} channels were detected".format(
348 num_channels
349 )
349 )
350 )
351 if sample_rate != desired_sample_rate:
352 logger.warn(353 "Original sample rate ({}) is different than {}hz. Resampling might produce erratic speech recognition.".format(
354 sample_rate, desired_sample_rate
355 )
343 else:
344 # different warning message depending on the problem (or both messages)
345 if num_channels != 1:
346 logger.warn(347 "Resampling to one channel since {} channels were detected".format(
348 num_channels
349 )
349 )
350 )
351 if sample_rate != desired_sample_rate:
352 logger.warn(353 "Original sample rate ({}) is different than {}hz. Resampling might produce erratic speech recognition.".format(
354 sample_rate, desired_sample_rate
355 )
635 elif self.params.combination_algo == "keyword_based":
636 summarized_combined = keyword_based_ext(ocr_results_flat, self.transcript)
637 else: # if no combination algorithm was specified, which should never happen since argparse checks
638 logger.warn("No combination algorithm selected. Defaulting to `concat`.")639 summarized_combined = ocr_results_flat + self.transcript
640
641 # Modifications
The method is marked as deprecated and will be removed in a future version of Python. Consider looking for an alternative in the documentation.