mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
fix the output of vad_results is null
This commit is contained in:
parent
2af58ee953
commit
c81e3096b2
@ -1,4 +1,4 @@
|
|||||||
import argparse
|
mport argparse
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
@ -236,12 +236,13 @@ def inference_modelscope(
|
|||||||
# param_dict['in_cache'] = batch['in_cache']
|
# param_dict['in_cache'] = batch['in_cache']
|
||||||
if results:
|
if results:
|
||||||
for i, _ in enumerate(keys):
|
for i, _ in enumerate(keys):
|
||||||
results[i] = json.dumps(results[i])
|
if results[i]:
|
||||||
item = {'key': keys[i], 'value': results[i]}
|
results[i] = json.dumps(results[i])
|
||||||
vad_results.append(item)
|
item = {'key': keys[i], 'value': results[i]}
|
||||||
if writer is not None:
|
vad_results.append(item)
|
||||||
results[i] = json.loads(results[i])
|
if writer is not None:
|
||||||
ibest_writer["text"][keys[i]] = "{}".format(results[i])
|
results[i] = json.loads(results[i])
|
||||||
|
ibest_writer["text"][keys[i]] = "{}".format(results[i])
|
||||||
|
|
||||||
return vad_results
|
return vad_results
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user