bugfix
This commit is contained in:
parent
8c5cce3558
commit
e0dfb15361
@ -1,7 +1,7 @@
|
||||
{
|
||||
"filesroot":"$[workdir]$/files",
|
||||
|
||||
"model_path": "/data/ymq/models/openai/whisper-large-v3",
|
||||
"model_path": "/data/ymq/models/openai/whisper-large-v3-turbo",
|
||||
"redis_url": "redis://127.0.0.1:6379",
|
||||
"worker_cnt": 1,
|
||||
"logger":{
|
||||
|
||||
2
fw/fw.py
2
fw/fw.py
@ -2,6 +2,7 @@ from longtasks.longtasks import LongTasks
|
||||
from faster_whisper import WhisperModel
|
||||
from appPublic.worker import awaitify
|
||||
from appPublic.jsonConfig import getConfig
|
||||
from appPublic.log import debug, exception
|
||||
from ahserver.filestorage import FileStorage
|
||||
|
||||
class MyLongTask(LongTasks):
|
||||
@ -39,6 +40,7 @@ class MyLongTask(LongTasks):
|
||||
|
||||
def transcribe(self, model, fpath):
|
||||
segments, info = model.transcribe(fpath, beam_size=5)
|
||||
debug(f'{segments=}, {info=}')
|
||||
return {
|
||||
'language': info.language,
|
||||
'language_probability': info.language_probability,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user