chore: Fix typos in docs and examples (#36524)
Fix typos in docs and examples Signed-off-by: co63oc <co63oc@users.noreply.github.com>
This commit is contained in:
@@ -74,7 +74,7 @@ be installed as follows: `apt install libsndfile1-dev`
|
||||
For multilingual speech translation models, `eos_token_id` is used as the `decoder_start_token_id` and
|
||||
the target language id is forced as the first generated token. To force the target language id as the first
|
||||
generated token, pass the `forced_bos_token_id` parameter to the `generate()` method. The following
|
||||
example shows how to transate English speech to French text using the *facebook/s2t-medium-mustc-multilingual-st*
|
||||
example shows how to translate English speech to French text using the *facebook/s2t-medium-mustc-multilingual-st*
|
||||
checkpoint.
|
||||
|
||||
```python
|
||||
|
||||
@@ -111,7 +111,7 @@ def decode(container, sampling_rate, num_frames, clip_idx, num_clips, target_fps
|
||||
Returns:
|
||||
frames (tensor): decoded frames from the video.
|
||||
'''
|
||||
assert clip_idx >= -2, "Not a valied clip_idx {}".format(clip_idx)
|
||||
assert clip_idx >= -2, "Not a valid clip_idx {}".format(clip_idx)
|
||||
frames, fps = pyav_decode(container, sampling_rate, num_frames, clip_idx, num_clips, target_fps)
|
||||
clip_size = sampling_rate * num_frames / target_fps * fps
|
||||
index = np.linspace(0, clip_size - 1, num_frames)
|
||||
|
||||
Reference in New Issue
Block a user