diff --git a/app.py b/app.py index 55dfd31..0fd9ff3 100644 --- a/app.py +++ b/app.py @@ -1,5 +1,6 @@ from flask import Flask, request, render_template, jsonify import speech_recognition as sr +import Textalk.parsestr as parse app = Flask(__name__) @app.route('/') @@ -13,5 +14,8 @@ def record(): with mic as source: r.adjust_for_ambient_noise(source) audio = r.listen(source) - a = r.recognize_google(audio) - return a + text = r.recognize_google(audio) + converted, calculated = parse(text) + return "Text: " + text + "\" + + "Converted:" + converted + "\" + + "Calculated: " + calculated