microsoft / SpeechT5

Unified-Modal Speech-Text Pre-Training for Spoken Language Processing
MIT License
1.09k stars 113 forks source link

extract transorformer layer feature #74

Open zbpjlc opened 4 months ago

zbpjlc commented 4 months ago

SpeechT5 , how can i extract the fixed transorformer layer feature; in the hubert paper: image so,in the SpeechT5,how can i do,Is there any relevant code ?

zbpjlc commented 4 months ago

for the second iteration

Ajyy commented 3 months ago

Sorry, we did not provide the scripts but you can modify from here and get the last layer features by passing "feature_only" parameter during forward which will return the feature in here.