Skip to content

[Bug] Chunk Timestamp [1] is not rounded #159

@PushpenderSaini0

Description

@PushpenderSaini0

Describe the bug

While using Whisper Web and trying to export to JSON i have encountered a bug.
The timestamp[1] does not have proper rounder values like the timestamp[0].

I have verified this is not a bug due to exporting to JSON, I believe that wrong variable is used when setting chunk.timestamp[1]

Please check this line here

chunk.timestamp[1] = time;

This should be equal to rounded_time

- chunk.timestamp[1] = time;
+ chunk.timestamp[1] = rounded_time;

How to reproduce

You can reproduce this bug by using the default audio link provided and then exporting to JSON

Website
Audio

Expected behavior

timestamp[1] should have rounder values like the timestamp[0]

Logs/screenshots

image

Environment

  • Transformers.js version: 2.2.0

Additional context

I have tried to make changes to the code.

- chunk.timestamp[1] = time;
+ chunk.timestamp[1] = rounded_time;

This change does fix the problem.

image

You can assign this bug to me, and I can raise a PR with this fix.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions