From 3d6344ead33067ae40e61404fd9a452df1e67b1a Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Fri, 25 Oct 2024 18:49:33 +0800 Subject: [PATCH] Fix building node-addon for Windows x86. (#1469) --- .../node-addon-api/src/non-streaming-speaker-diarization.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/node-addon-api/src/non-streaming-speaker-diarization.cc b/scripts/node-addon-api/src/non-streaming-speaker-diarization.cc index 56767476a..a35f7924a 100644 --- a/scripts/node-addon-api/src/non-streaming-speaker-diarization.cc +++ b/scripts/node-addon-api/src/non-streaming-speaker-diarization.cc @@ -238,11 +238,12 @@ static Napi::Array OfflineSpeakerDiarizationProcessWrapper( for (int32_t i = 0; i != num_segments; ++i) { Napi::Object obj = Napi::Object::New(env); + obj.Set(Napi::String::New(env, "start"), segments[i].start); obj.Set(Napi::String::New(env, "end"), segments[i].end); obj.Set(Napi::String::New(env, "speaker"), segments[i].speaker); - ans[i] = obj; + ans.Set(i, obj); } SherpaOnnxOfflineSpeakerDiarizationDestroySegment(segments);