main
黄海 5 months ago
parent 1a89710ea3
commit a9ea0aed6c

@ -127,9 +127,8 @@ def save_transcription_result(result: Dict, output_path: Path) -> Path:
raise ValueError("识别结果为空")
try:
full_text = ''.join(s.get("Text", "") for s in result['Sentences'])
output_path.parent.mkdir(parents=True, exist_ok=True)
output_path.write_text(full_text, encoding='utf-8')
output_path.write_text(str(result['Sentences']), encoding='utf-8')
return output_path.resolve()
except (IOError, PermissionError) as e:
raise IOError(f"文件保存失败: {str(e)}") from e

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save