Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fixing wrong information in Mimi Docs#42785

Open
MohamedAliRashad wants to merge 1 commit into
huggingface:mainfrom
MohamedAliRashad:patch-1
Open

Fixing wrong information in Mimi Docs#42785
MohamedAliRashad wants to merge 1 commit into
huggingface:mainfrom
MohamedAliRashad:patch-1

Conversation

@MohamedAliRashad

Copy link
Copy Markdown
model_id = "kyutai/mimi"
mimi_model = MimiModel.from_pretrained(model_id)
feature_extractor = AutoFeatureExtractor.from_pretrained(model_id)

# Check your exact frame rate
total_stride = 1
for ratio in mimi_model.config.upsampling_ratios:
    total_stride *= ratio

frame_rate = mimi_model.config.sampling_rate / total_stride
print(f"Sampling Rate: {mimi_model.config.sampling_rate}")
print(f"Total Stride: {total_stride}")
print(f"ACTUAL Frame Rate: {frame_rate} Hz")
print(f"Duration per frame: {1/frame_rate:.4f} seconds")

The output of this code is:

Sampling Rate: 24000
Total Stride: 960
ACTUAL Frame Rate: 25.0 Hz
Duration per frame: 0.0400 seconds

So the correct frame rate is 25Hz not 12.5, also the codebooks returned are 32 not 16.

@Rocketknight1

Copy link
Copy Markdown
Member

cc @eustlb @ebezzam

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.

2 participants