include ffmpeg, etc dependencies

This commit is contained in:
Brandon Thomas
2023-04-07 00:26:37 -04:00
parent 31bfa49bec
commit 7462bf1838
2 changed files with 9 additions and 4 deletions
+5
View File
@@ -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 \
+4 -4
View File
@@ -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)