Dutch, Flemish asr_wav2vec2_large_xlsr_53_polish_by_facebook_gpu TFWav2Vec2ForCTC for GPU from facebook

Description

Pretrained Wav2vec2 model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.asr_wav2vec2_large_xlsr_53_polish_by_facebook is a Dutch, Flemish model originally trained by facebook.

NOTE: This model only works on a GPU, if you need to use this model on a CPU device please use asr_wav2vec2_large_xlsr_53_polish_by_facebook

Download Copy S3 URI

How to use


audio_assembler = AudioAssembler() \
    .setInputCol("audio_content") \
    .setOutputCol("audio_assembler")

speech_to_text = Wav2Vec2ForCTC \
    .pretrained("asr_wav2vec2_large_xlsr_53_polish_by_facebook_gpu", "nl")\
    .setInputCols("audio_assembler") \
    .setOutputCol("text")

pipeline = Pipeline(stages=[
  audio_assembler,
  speech_to_text,
])

pipelineModel = pipeline.fit(audioDf)

pipelineDF = pipelineModel.transform(audioDf)

val audioAssembler = new AudioAssembler()
    .setInputCol("audio_content") 
    .setOutputCol("audio_assembler")

val speechToText = Wav2Vec2ForCTC
    .pretrained("asr_wav2vec2_large_xlsr_53_polish_by_facebook_gpu", "nl")
    .setInputCols("audio_assembler") 
    .setOutputCol("text") 

val pipeline = new Pipeline().setStages(Array(audioAssembler, speechToText))

val pipelineModel = pipeline.fit(audioDf)

val pipelineDF = pipelineModel.transform(audioDf)

import nlu
import requests
response = requests.get('https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/resources/en/audio/samples/wavs/ngm_12484_01067234848.wav')
with open('ngm_12484_01067234848.wav', 'wb') as f:
    f.write(response.content)
nlu.load("nl.speech2text.wav2vec_xlsr.v2_large_gpu.polish.by_facebook").predict("ngm_12484_01067234848.wav")

Model Information

Model Name: asr_wav2vec2_large_xlsr_53_polish_by_facebook_gpu
Compatibility: Spark NLP 4.2.0+
License: Open Source
Edition: Official
Input Labels: [audio_assembler]
Output Labels: [text]
Language: nl
Size: 755.4 MB