Code Monkey home page Code Monkey logo

tacotron2-wav2vec-transcription's Introduction

Tacotron2-Wav2Vec-Transcription

A Python script that uses the Wav2Vec2 model to transcribe .wav files and generates a .txt file for training a Tacotron2 text-to-speech model.

Overview

This script transcribes audio files in the WAV format using the Wav2Vec2 model from the Hugging Face Transformers library. It processes each WAV file, generates its corresponding transcription, and saves the transcription along with the file path in a .txt file. This .txt file can then be used for training a Tacotron2 text-to-speech model.

Prerequisites

  • Python 3.6 or higher
  • PyTorch
  • torchaudio
  • transformers

Installation

  1. Clone the repository:

git clone https://github.com/yourusername/Tacotron2-Wav2Vec-Transcription.git

markdown Copy code

  1. Install the required packages:

pip install torch torchaudio transformers

markdown Copy code

Usage

  1. Modify the transcribe_wav2vec.py script to set the appropriate input and output paths.

  2. Run the script:

python transcribe_wav2vec.py

csharp Copy code

Output

The output .txt file contains one line per transcribed WAV file, with the file path followed by a pipe character | and the transcription. The format is as follows:

/content/TTS-TT2/wavs/1.wav|transcription of the first file /content/TTS-TT2/wavs/2.wav|transcription of the second file ... /content/TTS-TT2/wavs/n.wav|transcription of the nth file

Copy code

tacotron2-wav2vec-transcription's People

Contributors

rasmurtech avatar

Stargazers

Lee Min Waan avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.