This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let pipe = try await WhisperKit(model: "large-v3") | |
let result = try await pipe.transcribe(audioPath: "test.{wav/flac/mp3}")?.text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !pip install transformers sentencepiece | |
import torch | |
import torch.nn as nn | |
torch.set_grad_enabled(False) | |
from transformers import AutoTokenizer, AutoModelForCausalLM | |
from transformers.activations import ReLUSquaredActivation | |
from collections import defaultdict, OrderedDict |