chiraggupta8769 commited on
Commit
96c3b61
·
verified ·
1 Parent(s): 4c3594b

Update bark_infer.py

Browse files
Files changed (1) hide show
  1. 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 input text
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 output
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)