Skip to content

Commit

Permalink
update interface return
Browse files Browse the repository at this point in the history
  • Loading branch information
kenwaytis committed Jul 14, 2023
1 parent cc73b5a commit c4e5972
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
build:
context: .
dockerfile: Dockerfile
image: paidax/funasr_python:0.2.3
image: paidax/funasr_python:0.3
runtime: nvidia
ports:
- 9527:9527
Expand Down
4 changes: 4 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ async def predict(items: Audio):
decoded_data = convert_audio_to_wav(decoded_data)
load_model(model_type=items.model_type, hotword=items.hotword)
rec_result = loaded_model["model"](audio_in=decoded_data)
if items.model_type=='normal' or items.model_type=='long':
rec_result = {
"text": rec_result["text"]
}
log.info(rec_result)
return rec_result

Expand Down

0 comments on commit c4e5972

Please sign in to comment.