# Speech language detection using Wave2vec 2.0

**URL:** <https://discuss.huggingface.co/t/speech-language-detection-using-wave2vec-2-0/5031>\
**Category:** 🤗Transformers\
**Created:** [March 24, 2021, 5:11am UTC](https://discuss.huggingface.co/t/speech-language-detection-using-wave2vec-2-0/5031 "2021-03-24T05:11:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Parth](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/parth/32/401_2.png) [@Parth](https://discuss.huggingface.co/u/Parth)\
**Post date:** [March 24, 2021, 5:11am UTC](https://discuss.huggingface.co/t/speech-language-detection-using-wave2vec-2-0/5031/1 "2021-03-24T05:11:25Z")

</div>

I wanted to know whether if we can train Wave2vec 2.0 to detect languages from audio. Like speech to text work only if we know the original language of the audio. Can we detect the language from audio files? Any input will be helpful  
@valhalla

---

<div class="post-metadata">

**Author:** ![EmreOzkose](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/emreozkose/32/18399_2.png) [@EmreOzkose](https://discuss.huggingface.co/u/EmreOzkose)\
**Post date:** [March 24, 2021, 5:36am UTC](https://discuss.huggingface.co/t/speech-language-detection-using-wave2vec-2-0/5031/2 "2021-03-24T05:36:31Z")

</div>

Do you mean classifying the language with given audio? How much big is your data? It is an easy task by using a few convolution layer with a few language.

---

<div class="post-metadata">

**Author:** ![Parth](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/parth/32/401_2.png) [@Parth](https://discuss.huggingface.co/u/Parth)\
**Post date:** [March 24, 2021, 5:40am UTC](https://discuss.huggingface.co/t/speech-language-detection-using-wave2vec-2-0/5031/3 "2021-03-24T05:40:15Z")

</div>

Yes,@EmreOzkose Can you suggest some script or library for classifying the language with the given audio? I couldn’t find any SOTA in this task. I have a large amount of audio data for my task.

---

<div class="post-metadata">

**Author:** ![EmreOzkose](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/emreozkose/32/18399_2.png) [@EmreOzkose](https://discuss.huggingface.co/u/EmreOzkose)\
**Post date:** [March 24, 2021, 5:58am UTC](https://discuss.huggingface.co/t/speech-language-detection-using-wave2vec-2-0/5031/4 "2021-03-24T05:58:44Z")

</div>

You should check [this challenge](http://cslt.riit.tsinghua.edu.cn/mediawiki/index.php/OLR_Challenge_2020) which has 3 task for spoken language detection and nice SOTA approaches. [Some of these methods](http://cslt.riit.tsinghua.edu.cn/mediawiki/images/0/06/Royal-Flush_system_description.pdf) also contains transformer. This means you can use Huggingface.
