TencentGameMate / chinese_speech_pretrain

chinese speech pretrained models
997 stars 84 forks source link

音频fps如何调整为25 #52

Open tailangjun opened 5 months ago

tailangjun commented 5 months ago

我用 chinese-hubert-large提取音频特征,发现生成的fps是50,我需要25的fps,请问需要怎么调整呀,谢谢

tailangjun commented 5 months ago

这样在维度 1上间隔取值不知道可以不

    CHModel = ChineseHubert(model_path)
    ch_feature = CHModel.compute_audio_feature(audio_path)
    print(ch_feature.shape)
    # (1, 239, 1024)
    print(ch_feature[:, ::2, :].shape)
    # (1, 120, 1024) shape满足要求