Skip to content

Commit

Permalink
Add description to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Naki21 committed Sep 25, 2017
1 parent 92b2d4a commit 5b7c636
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions README.txt
@@ -1,3 +1,5 @@
This script is for extracting and transcribing audio files from .mp4 video files into .srt formatted text files for subtitling purposes using Googles Speech-to-Text and Google Cloud Storage APIs. It outputs both a raw text transcription and a .srt formatted version. In the current version, this script requires you to authenticate your Google credentials through the gcloud CLI and also requires that you have ffmpeg installed locally on your machine (for video to audio conversion and compression)

Instructions for use

Use the Cloud Platform Console to create a new Cloud
Expand All @@ -6,7 +8,7 @@ enable billing: https://console.cloud.google.com/
(Skip if project already set up)

Enable the Google Speech to Text API
in APIs and Services of new project
in APIs and Services in new project dashboard

Set up a storage bucket in Google Cloud Storage

Expand All @@ -15,6 +17,9 @@ Download, install and set up Google SDK
https://cloud.google.com/sdk/
(authenticate your machine by following the auth instructions)

Install ffmpeg
sudo apt update
sudo apt install ffmpeg

Set your virtual environment

Expand All @@ -28,21 +33,18 @@ virtualenv env
source env/bin/activate
pip install -r requirements.txt

Install ffmpeg
sudo apt update
sudo apt install ffmpeg

In goog.py change the bucket_name variable to the name of the storage bucket you wish to use

To run transcription script add .mp4 files to specified directory
To run transcription script add .mp4 files to a specified directory

Then run:

python autorun.py /path/to/directory/

The script will automatically strip the audio files from the video and Convert them to .ogg format
The script will automatically strip the audio files from the video and convert them to .ogg format

The it uploads the audio to the gcloud storage bucket and
then passes its gcs_uri to the transcription API for processing
then passes its gcs_uri to the speech to text API for processing

When finished, it outputs both the .srt formatted file and raw text file into the specified directory

Expand Down

0 comments on commit 5b7c636

Please sign in to comment.