Update README.md
Browse files
    	
        README.md
    CHANGED
    
    | @@ -210,15 +210,14 @@ The "<|en|>" token is used to specify that the speech is in english and should b | |
| 210 |  | 
| 211 | 
             
            >>> # load dummy dataset and read soundfiles
         | 
| 212 | 
             
            >>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
         | 
| 213 | 
            -
             | 
| 214 | 
            -
            >>> # tokenize
         | 
| 215 | 
             
            >>> input_features = processor(ds[0]["audio"]["array"], return_tensors="pt").input_features 
         | 
| 216 | 
            -
             | 
| 217 | 
            -
            >>>  | 
|  | |
| 218 | 
             
            >>> # take argmax and decode
         | 
| 219 | 
             
            >>> predicted_ids = torch.argmax(logits, dim=-1)
         | 
| 220 | 
             
            >>> transcription = processor.batch_decode(predicted_ids)
         | 
| 221 | 
            -
            ['<| | 
| 222 | 
             
            ```
         | 
| 223 |  | 
| 224 | 
             
            ### French to French 
         | 
|  | |
| 210 |  | 
| 211 | 
             
            >>> # load dummy dataset and read soundfiles
         | 
| 212 | 
             
            >>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
         | 
|  | |
|  | |
| 213 | 
             
            >>> input_features = processor(ds[0]["audio"]["array"], return_tensors="pt").input_features 
         | 
| 214 | 
            +
             | 
| 215 | 
            +
            >>> # Generate logits
         | 
| 216 | 
            +
            >>> logits = model(input_features, decoder_input_ids = torch.tensor([[50258]]).logits 
         | 
| 217 | 
             
            >>> # take argmax and decode
         | 
| 218 | 
             
            >>> predicted_ids = torch.argmax(logits, dim=-1)
         | 
| 219 | 
             
            >>> transcription = processor.batch_decode(predicted_ids)
         | 
| 220 | 
            +
            ['<|en|>']
         | 
| 221 | 
             
            ```
         | 
| 222 |  | 
| 223 | 
             
            ### French to French 
         | 

