File size: 429 Bytes
b0c0f32
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import json

# 假设这是你的 JSON 文件路径
json_file_path = 'FakeSV/code_test/Text_Feature/data/douyin_6700861687563570439.json'

# 打开并读取 JSON 文件内容
with open(json_file_path, 'r', encoding='utf-8') as file:
    data = json.load(file)  # 解析 JSON 数据为字典

# 获取 'wav_result' 列表中第一个元素的 'text' 字段
text = data['wav_result'][0]['text']

# 打印获取的文本
print(text)