Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix not-null terminated string print within C template #654

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

haixuanTao
Copy link
Collaborator

@haixuanTao haixuanTao commented Sep 11, 2024

C Node Template used to read the ID string that was not null terminated making it read non UTF8 strings,

This fixes this issue by using the id_len to define the string.

Before

[c node] dora context initialized
I heard Hello World from speech-2 at 7413312390293631648
I heard Hello World from speech-1� at 7413312390293852048
I heard Hello World from speech-1rld at 7413312390724241040
I heard Hello World from speech-1 at 7413312391153242512
I heard Hello World from speech-1rld at 7413312391583614704
I heard Hello World from speech-1 at 7413312392013829936
I heard Hello World from speech-1 at 7413312392445357008
I heard Hello World from speech-1 at 7413312392869967824
I heard Hello World from speech-1 at 7413312393300188464
I heard Hello World from speech-1 at 7413312393728743248
I heard Hello World from speech-1 at 7413312394163419488
[c node] received input closed event
I heard Hello World from speech-2 at 7413312398882741200
[c node] received stop event

After

[c node] dora context initialized
I heard Hello World from speech-2 at 7413314362653395744
I heard Hello World from speech-1 at 7413314362653612304
I heard Hello World from speech-1 at 7413314363085816864
I heard Hello World from speech-1 at 7413314363514843808
I heard Hello World from speech-1 at 7413314363944633504
I heard Hello World from speech-1 at 7413314364373638000
I heard Hello World from speech-1 at 7413314364802237744
I heard Hello World from speech-1 at 7413314365230875824
I heard Hello World from speech-1 at 7413314365659380208
I heard Hello World from speech-1 at 7413314366092720496
I heard Hello World from speech-1 at 7413314366519381008
[c node] received input closed event
[c node] received stop event

@haixuanTao haixuanTao merged commit 463e2f7 into main Sep 11, 2024
40 checks passed
@haixuanTao haixuanTao deleted the fix-c-template-c-string-error branch September 11, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant