From eb87a8ae659032644a5d4d2d145b2c5fa14180f0 Mon Sep 17 00:00:00 2001 From: Mario Gonzalez Gil Date: Mon, 27 Nov 2023 18:27:06 +0100 Subject: [PATCH] only google --- main.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main.py b/main.py index d58a398..c75a6d3 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,4 @@ -import whisper +#import whisper import time from google.cloud import speech_v1 from google.cloud.speech_v1 import types @@ -16,13 +16,13 @@ class Response(BaseModel): encoding:str -model = whisper.load_model("medium") -@app.post("/voice2txt/") -def calculate_api(response: Response): - path = response.path - t=time.time() - result = model.transcribe(path)["text"] - return {"message": result,"time":time.time()-t} +#model = whisper.load_model("medium") +#@app.post("/voice2txt/") +#def calculate_api(response: Response): + #path = response.path + #t=time.time() + #result = model.transcribe(path)["text"] + #return {"message": result,"time":time.time()-t} @app.post("/voice2txtGoogle/")