Spaces:
Runtime error
Runtime error
Delete inference.sh
Browse files- inference.sh +0 -45
inference.sh
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
#!/bin/bash
|
2 |
-
|
3 |
-
Check if a text file is provided as an argument
|
4 |
-
if [ "$#" -ne 1 ]; then
|
5 |
-
echo "Usage: $0 <text_file>"
|
6 |
-
exit 1
|
7 |
-
fi
|
8 |
-
|
9 |
-
text_file="$1"
|
10 |
-
|
11 |
-
# Check if the provided text file exists
|
12 |
-
if [ ! -f "$text_file" ]; then
|
13 |
-
echo "Error: Text file '$text_file' not found."
|
14 |
-
exit 1
|
15 |
-
fi
|
16 |
-
# Define the list of speaker IDs
|
17 |
-
speakers="92 6097 6670 6671 8051 9017 9136 11614 11697 12787"
|
18 |
-
counter=1
|
19 |
-
|
20 |
-
# Read lines from text_file.txt
|
21 |
-
while IFS= read -r line; do
|
22 |
-
# Skip empty lines
|
23 |
-
[ -z "$line" ] && continue
|
24 |
-
|
25 |
-
label="text$counter"
|
26 |
-
counter=$((counter+1))
|
27 |
-
|
28 |
-
# Iterate through each fixed speaker ID
|
29 |
-
for speaker_id in $speakers; do
|
30 |
-
output_dir="/mnt/workspace/tzeying/inference/inf_librihifi_320k/trial1/${label}/${speaker_id}"
|
31 |
-
speaker_name="hifitts_${speaker_id}"
|
32 |
-
|
33 |
-
sh /mnt/workspace/wangmingxuan/vits_on_libritts_hifitts/Amphion/egs/tts/vits_hifitts/run.sh \
|
34 |
-
--stage 3 \
|
35 |
-
--gpu "4" \
|
36 |
-
--infer_expt_dir /mnt/workspace/xueliumeng/data/vits_on_libritts_hifitts/logs/Libri_HifiTTS_All \
|
37 |
-
--infer_output_dir "$output_dir" \
|
38 |
-
--infer_mode "single" \
|
39 |
-
--infer_text "$line" \
|
40 |
-
--infer_speaker_name "$speaker_name"
|
41 |
-
|
42 |
-
echo "Processing complete for speaker ID: $speaker_id"
|
43 |
-
done
|
44 |
-
echo "Processing complete for line: $counter"
|
45 |
-
done < "$text_file"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|