ユーザ用ツール

サイト用ツール


サイドバー

最新の10件
一覧
stt:reazonspeech

ReazonSpeech

$ sudo apt install python3-venv
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install wheel
$ pip install git+https://github.com/reazon-research/reazonspeech.git
$ reazonspeech --help
USAGE

    reazonspeech [-h] [--to={vtt,srt,ass,json,tsv}] [-o file] audio

OPTIONS

    audio
        Audio file to transcribe. It can be in any format as long
        as librosa.load() can read.

    -h, --help
        Print this help message.

    --to={vtt,srt,ass,json,tsv}
        Output format for transcription

    -o file, --output=file
        File to write transcription

EXAMPLES

    # Transcribe audio file
    $ reazonspeech sample.wav

    # Output subtitles in VTT format
    $ reazonspeech -o sample.vtt sample.webm
$ wget https://research.reazon.jp/_downloads/a8f2c35bb3d351a76212b2257d5bfc85/speech-001.wav
$ reazonspeech ./speech-001.wav
[nltk_data] Downloading package averaged_perceptron_tagger to
[nltk_data]     /home/matoken/nltk_data...
[nltk_data]   Unzipping taggers/averaged_perceptron_tagger.zip.
[nltk_data] Downloading package cmudict to /home/matoken/nltk_data...
[nltk_data]   Unzipping corpora/cmudict.zip.
Downloading (…)37eea/.gitattributes: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.48k/1.48k [00:00<00:00, 114kB/s]
Downloading (…)0228a37eea/README.md: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 706/706 [00:00<00:00, 115kB/s]
Downloading (…)0228a37eea/meta.yaml: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 400/400 [00:00<00:00, 113kB/s]
Downloading (…)_jp_char/config.yaml: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 38.2k/38.2k [00:00<00:00, 42.6kB/s]
Downloading (…)_jp_char/config.yaml: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 36.4k/36.4k [00:00<00:00, 40.8kB/s]
Downloading feats_stats.npz: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.40k/1.40k [00:00<00:00, 295kB/s]
Downloading (…)id.acc.ave_3best.pth: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 478M/478M [26:27<00:00, 301kB/s]
Downloading 34epoch.pth: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 354M/354M [52:58<00:00, 111kB/s]
Fetching 8 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 8/8 [53:01<00:00, 397.68s/it]
{"start_seconds": 0.528, "end_seconds": 5.325, "text": "気象庁は雪や路面の凍結による交通への影響"}███████████████████████████████████████████████████████████████████████████████| 354M/354M [52:58<00:00, 132kB/s]
{"start_seconds": 5.325, "end_seconds": 12.521, "text": "暴風雪や高波に警戒するとともに雪崩や屋根からの落雪にも十分注意するよう呼びかけています"}
$ time reazonspeech ./speech-001.wav
Fetching 8 files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:00<00:00, 88301.14it/s]
{"start_seconds": 0.528, "end_seconds": 5.325, "text": "気象庁は雪や路面の凍結による交通への影響"}
{"start_seconds": 5.325, "end_seconds": 12.521, "text": "暴風雪や高波に警戒するとともに雪崩や屋根からの落雪にも十分注意するよう呼びかけています"}

real    0m52.036s
user    1m25.275s
sys     0m2.299s
$ time reazonspeech --to=vtt ./speech-001.wav
Fetching 8 files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:00<00:00, 35507.34it/s]
WEBVTT

00:00:00.527 --> 00:00:05.325
気象庁は雪や路面の凍結による交通への影響

00:00:05.325 --> 00:00:12.521
暴風雪や高波に警戒するとともに雪崩や屋根からの落雪にも十分注意するよう呼びかけています


real    0m48.300s
user    1m24.619s
sys     0m2.207s
$ time reazonspeech --output=./TBS1040066744_27632.wav.vtt ./TBS1040066744_27632.wav
Fetching 8 files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:00<00:00, 118987.35it/s]
Transcribing: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋| 1719/1722 [1:54:14<00:11,  3.99s/s]

real    114m25.184s
user    224m38.798s
sys     1m30.972s
$ head ./TBS1040066744_27632.wav.vtt
WEBVTT

00:00:00.335 --> 00:00:10.167
自転車協会プレゼンツ自転車協会プレゼンツ

00:00:13.429 --> 00:00:28.872
今週も始まりました自転車協会プレゼンツミラクルサイクルライフパーソナリティーの石井正規です生田智です自転車って楽しいを合言葉にサイクルライフの魅力をお伝えする自転車エンターテインメント番組ですはいまずはこちらの
コーナーから

00:00:28.872 --> 00:00:29.736
週刊

コメント

コメントを入力. Wiki文法が有効です:
 __  __  __  __  _      __  __  __  __  __
 \ \/ / / / / / | | /| / / / / / / / / / /
  \  / / /_/ /  | |/ |/ / / /_/ / / /_/ / 
  /_/  \____/   |__/|__/  \____/  \____/
 
stt/reazonspeech.txt · 最終更新: 2023/06/20 07:18 by matoken