import torchfrom transformers import WhisperForConditionalGeneration, AutoProcessor, pipeline model = WhisperForConditionalGeneration.from_pretrained("harpertoken/talk")processor = AutoProcessor.from_pretrained("harpertoken/talk") transcriber = pipeline( "automatic-speech-recognition", model=model, tokenizer=processor.tokenizer, feature_extractor=processor.feature_extractor, torch_dtype=torch.float32,) # Supply 16 kHz mono float32 samples as a numpy array. The pipeline rejects a# placeholder such as (0, 16000): it raises TypeError on a tuple. Load real audio# with soundfile or librosa, for example:# audio, sample_rate = sf.read("clip.wav", dtype="float32")# assert sample_rate == 16000audio = load_audio() # your loader, returning np.ndarray of shape (n,)print(transcriber(audio, return_timestamps=True))