I need to use the https://huggingface.co/speech31/wav2vec2-large-TIMIT-IPA2 model to convert speech to International Phonetic Alphabet. I don’t know how can I pass in the audio file and get the string output:
from transformers import AutoProcessor, AutoModelForCTC
processor = AutoProcessor.from_pretrained("speech31/wav2vec2-large-TIMIT-IPA2")
model = AutoModelForCTC.from_pretrained("speech31/wav2vec2-large-TIMIT-IPA2")
audio_file = "./male-voice.wav"
ipa_output = # what should I do next?
print(ipa_output)
Thank you for your help!