This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filepath = "~/audio_wav/" #Input audio file path | |
output_filepath = "`/Transcripts/" #Final transcript path | |
bucketname = "upload" #Name of the bucket created in the step before | |
# Import libraries | |
from pydub import AudioSegment | |
import io | |
import os | |
from google.cloud import speech | |
from google.cloud.speech import enums |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def remove_special_characters(text): | |
pattern = r'[^a-zA-z\s]' | |
text = re.sub(pattern, '', text) | |
return text |