Esempio n. 1
0
def speech_recognition_instance():
    log_messages_functions.info_log_message(
        "speech_recognition_instance function: Create a Recognizer instance")
    return sr.Recognizer()
Esempio n. 2
0
def read_voice_file(voice_path):
    log_messages_functions.info_log_message(
        "read_voice_file function: Create a AudioFile ")
    return sr.AudioFile(voice_path)
def write_file(file_name, text):
    log_messages_functions.info_log_message(
        "write_file function: Writes text to text.txt file")
    log_messages_functions.info_log_message("Text: " + text)
    file_name.write(text)
def open_file():
    log_messages_functions.info_log_message(
        "open_file function: Open text.txt file")
    return open("../utils/dataset/text.txt", "a", encoding="utf-8")
def get_video_path(file_name):
    log_messages_functions.info_log_message(
        "get_video_path function: Audio file path received ")
    return "../utils/source-file/" + file_name