INNER CODE UNIT · Python

api_message

Kushal997-das/Project-Guidance · Artificial Intelligence/Basic/Audio to ISL Translator/app.py:19

def api_message():
    f = open('./file.wav', 'wb')
    f.write(request.data)
    f.close()
    print('recording saved')
    global sentence
    sentence = speech_recognition.convert_speech_to_text()
    message = {'sentence': sentence}
    return jsonify(message)


@app.route('/ChangeSentenceFunction', methods=['GET', 'POST'])
def change_sentence():
    global sentence
    print(str(request.data)[2:-1])
    sentence = str(request.data)[2:-1]

    message = {'sentence': sentence}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…