This commit is contained in:
yumoqing 2024-08-10 16:42:51 +08:00
parent 504dfb3157
commit 4d1e151a52
2 changed files with 1 additions and 2 deletions

View File

@ -32,7 +32,6 @@ if __name__ == '__main__':
server = ConfiguredServer(workdir=workdir)
rf = RegisterFunction()
rf.register('generate', generate)
info(f'{rf.registKW=}')
g = ServerEnv()
g.whisper_engine = WhisperFile()
port = args.port or config.website.port or 8080

View File

@ -21,7 +21,7 @@ def save_base64_wav(base64_data, output_file,sample_rate=16000, num_channels=1):
# Write the decoded data to the WAV file
wf.writeframes(wav_data)
async def generate(request, **kw):
async def generate(request, kw):
params_kw = kw.get('params_kw', DictObject())
model = params_kw.model
audio = params_kw.audio