Skip to content

Instantly share code, notes, and snippets.

@SamuelAlgheriniAI
Last active July 2, 2021 08:14
Show Gist options
  • Save SamuelAlgheriniAI/d31a98b62d715ca8e03895f67c06cc83 to your computer and use it in GitHub Desktop.
Save SamuelAlgheriniAI/d31a98b62d715ca8e03895f67c06cc83 to your computer and use it in GitHub Desktop.
The function that call all the processes.
def speech_to_data():
preprocessing(path_base, path_converted_audio)
for file in os.listdir(path_converted_audio):
resampled_path, length = resample(file, sr) #sampled_name
print("\nTranscribing ", file)
transcript = asr_transcript(processor, model, resampled_path, length, block_length)
print(transcript)
report = text_analysis(transcript, language, audio_report, file, length)
shutil.rmtree(path_converted_audio)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment