Skip to content

Commit 150f4c3

Browse files
committed
fixed audio test
1 parent 6fc97f5 commit 150f4c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gradio/inputs.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1236,14 +1236,14 @@ def tokenize(self, x):
12361236

12371237
def get_masked_inputs(self, tokens, binary_mask_matrix):
12381238
# create a "zero input" vector and get sample rate
1239-
x = tokens[0]
1239+
x = tokens[0]["data"]
12401240
file_obj = processing_utils.decode_base64_to_file(x)
12411241
sample_rate, data = processing_utils.audio_from_file(file_obj.name)
12421242
zero_input = np.zeros_like(data, dtype='int16')
12431243
# decode all of the tokens
12441244
token_data = []
12451245
for token in tokens:
1246-
file_obj = processing_utils.decode_base64_to_file(token)
1246+
file_obj = processing_utils.decode_base64_to_file(token["data"])
12471247
_, data = processing_utils.audio_from_file(file_obj.name)
12481248
token_data.append(data)
12491249
# construct the masked version

0 commit comments

Comments
 (0)