mirror of
https://github.com/storytold/storyteller-ml.git
synced 2026-10-09 00:09:55 +00:00
include ffmpeg, etc dependencies
This commit is contained in:
@@ -17,6 +17,8 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
# Notes on packages:
|
||||
# * espeak-ng is critical for speech
|
||||
# * ffmpeg: file length detection
|
||||
# * libmagic: mimetype detection, other magic bytes operations in Python
|
||||
# * screen: not sure why included; I threw in tmux and curl for good measure
|
||||
# * unzip: not sure why included, but perhaps downloading models
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
@@ -24,6 +26,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
build-essential \
|
||||
curl \
|
||||
espeak-ng \
|
||||
ffmpeg \
|
||||
libmagic-dev \
|
||||
libmagic1 \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3.10 \
|
||||
|
||||
@@ -10,7 +10,7 @@ from tsvitsfe import TSVITSFE
|
||||
# For metadata
|
||||
import subprocess
|
||||
import magic
|
||||
import os
|
||||
import sys
|
||||
|
||||
def print_gpu_info():
|
||||
print('========================================')
|
||||
@@ -119,16 +119,16 @@ if __name__ == "__main__":
|
||||
|
||||
input_text = open(args.input_text_filename, 'r').read().strip()
|
||||
print(f'Input text: {input_text}')
|
||||
|
||||
|
||||
vits_fe = TSVITSFE()
|
||||
print("Loading model...")
|
||||
vits_fe.load(args.checkpoint,args.config,args.device)
|
||||
print("Doing inference...")
|
||||
out_aud = vits_fe.infer(input_text)
|
||||
|
||||
|
||||
out_fn = args.output_audio_filename
|
||||
sf.write(out_fn, out_aud, vits_fe.hps.data.sampling_rate)
|
||||
print(f"Wrote audio file {out_fn}")
|
||||
|
||||
generate_metadata_file(out_fn, args.output_metadata_filename)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user