Spaces:
Running
Running
Update bark_infer.py
Browse files- bark_infer.py +2 -2
bark_infer.py
CHANGED
@@ -8,7 +8,7 @@ parser.add_argument("--text_file", required=True)
|
|
8 |
parser.add_argument("--output", default="bark_output.wav")
|
9 |
args = parser.parse_args()
|
10 |
|
11 |
-
# Read
|
12 |
with open(args.text_file, "r") as f:
|
13 |
text = f.read()
|
14 |
|
@@ -18,5 +18,5 @@ preload_models()
|
|
18 |
# Generate audio from text
|
19 |
audio_array = generate_audio(text, history_prompt="v2/en_speaker_9")
|
20 |
|
21 |
-
# Save
|
22 |
scipy.io.wavfile.write(args.output, rate=22050, data=audio_array)
|
|
|
8 |
parser.add_argument("--output", default="bark_output.wav")
|
9 |
args = parser.parse_args()
|
10 |
|
11 |
+
# Read script
|
12 |
with open(args.text_file, "r") as f:
|
13 |
text = f.read()
|
14 |
|
|
|
18 |
# Generate audio from text
|
19 |
audio_array = generate_audio(text, history_prompt="v2/en_speaker_9")
|
20 |
|
21 |
+
# Save to file
|
22 |
scipy.io.wavfile.write(args.output, rate=22050, data=audio_array)
|