mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-26 04:39:53 +01:00
6 lines
268 B
Python
6 lines
268 B
Python
def extract_sentence_start_text(data):
|
|
output = data.get("payload", {}).get("output", {})
|
|
if output.get("type") != "sentence-begin":
|
|
return None
|
|
text = output.get("original_text")
|
|
return text if isinstance(text, str) and text.strip() else None
|