Skip to main content

Transript media file to text using google api.

Project description

# Voice2Text

Voice2Text is transcript media file to txt file to use Google Speach API &

## Installation

if you don't have this, please build google cloud projects and get from it.

#### Gcloud Project build

1. Google Cloud SDK Install

brew cask install google-cloud-sdk

2. Setting Gcloud Projects

gcloud auth login
gcloud alpha projects create voicetotext-123456 --name voice2text

3. Go to Projects URL and enable Google Speech API.
4. Please Enable (Billing)[].
5. Create Service Key and Downlaod (Ref:[Service Acount](

export GOOGLE_APPLICATION_CREDENTIALS='/your/service/acount/key/xxx.json'

#### Install

pip install voicetotext

## Usage

This application has two commands.
splitvoice is convert the voice diving.
voicetotext is voice existing in the folder into a text through google api.
(See help command)

splitvoice --help
voicetotext --help

## Sample

#### Split Audio Files

Sample Japanese voices from [here](

$ splitvoice voices/hana_1.mp3 --relative
spliting /57
spliting Done!
File was separete 57 filesOutput Separeted files? [Y/n]:y
separeted done! Have a nice Day!⏎

#### Transript Japanese audio files

$ voicetotext results/ -s 22050 -l "ja_JP"


## Error Handling

#### "Sample rate in request does not match FLAC header."

You need to examine the sample rate.
I recommend ffprove to examine.

$ ffmprove results/000.flac
Input #0, flac, from 'results/000.flac':
ENCODER : Lavf57.56.101
Duration: 00:00:01.87, start: 0.000000, bitrate: 184 kb/s
Stream #0:0: Audio: flac, 22050 Hz, mono, s16

You can get framerate. In this case, frame rate is 22050.
So, your commands is this.

$ voicetotext results -s 22050

## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

## Debugging
# virtualenv
python3 -m venv env
source ./env/bin/activate

# python packages install
pip install -r requirements.txt

## History

# License

This software is released under the MIT License, see LICENSE.txt.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for voicetotext, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size voicetotext-1.0.1-py3-none-any.whl (11.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size voicetotext-1.0.1.tar.gz (7.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page