This commit is contained in:
Serge Zaigraeff
2025-03-02 09:33:55 +03:00
parent 3e414630a7
commit e6b6ed52b7
4 changed files with 18 additions and 2 deletions
+3 -2
View File
@@ -29,7 +29,7 @@ class FakeFile:
Пример использования:
>>> with open('audio.wav', 'rb') as f:
>>> fake = FakeFile(f, 'audio.wav')
>>> fake.save('/tmp/copy.wav') # Новый метод сохранения
>>> fake.save('/tmp/copy.wav')
>>> processor.handle_file(fake)
"""
def __init__(self, file, filename):
@@ -123,7 +123,8 @@ class AudioFileProcessor:
return jsonify({
"text": text,
"processing_time": processing_time,
"response_size_bytes": len(text.encode('utf-8'))
"response_size_bytes": len(text.encode('utf-8')),
"model": os.path.basename(self.config["model_path"])
}), 200
except Exception as e: