Skip to content

Commit

Permalink
[Tasks] update automatic speech recognition output specs (#1167)
Browse files Browse the repository at this point in the history
It should have been `timestamp` instead of `timestamps` (see
transformers pipeline output
[here](https://github.com/huggingface/transformers/blob/9d2056f12b66e64978f78a2dcb023f65b2be2108/src/transformers/pipelines/automatic_speech_recognition.py#L648)).
this also aligns with fal-ai output
[specs](https://fal.ai/models/fal-ai/whisper/api#type-WhisperChunk) of
the model which is currently supported.
  • Loading branch information
hanouticelina authored Feb 4, 2025
1 parent 34e5352 commit c843fbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,6 @@ export interface AutomaticSpeechRecognitionOutputChunk {
/**
* The start and end timestamps corresponding with the text
*/
timestamps: number[];
timestamp: number[];
[property: string]: unknown;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"type": "string",
"description": "A chunk of text identified by the model"
},
"timestamps": {
"timestamp": {
"type": "array",
"description": "The start and end timestamps corresponding with the text",
"items": {
Expand All @@ -30,7 +30,7 @@
"maxLength": 2
}
},
"required": ["text", "timestamps"]
"required": ["text", "timestamp"]
}
}
},
Expand Down

0 comments on commit c843fbe

Please sign in to comment.