laxsvips commited on
Commit
54b7e81
·
1 Parent(s): 9316d35

Update audio.py

Browse files
Files changed (1) hide show
  1. audio.py +3 -3
audio.py CHANGED
@@ -7,11 +7,11 @@ import os
7
 
8
  DATASET_REPO_URL = "https://huggingface.co/datasets/laxsvips/audiofiles"
9
  DATA_FILENAME = "audio.mp4"
10
- DATA_FILE = os.path.join("data", DATA_FILENAME)
11
 
12
  HF_TOKEN = os.environ.get("HF_TOKEN")
13
  repo = Repository(
14
- local_dir="data", clone_from=DATASET_REPO_URL, use_auth_token=HF_TOKEN
15
  )
16
 
17
  def pad_buffer(audio):
@@ -29,7 +29,7 @@ def generate_voice(text):
29
  voice="Arnold",
30
  model="eleven_monolingual_v1"
31
  )
32
- save(audio,'data/audio.mp4')
33
  commit_url = repo.push_to_hub()
34
  return (commit_url)
35
  # return (44100, np.frombuffer(pad_buffer(audio), dtype=np.int16))
 
7
 
8
  DATASET_REPO_URL = "https://huggingface.co/datasets/laxsvips/audiofiles"
9
  DATA_FILENAME = "audio.mp4"
10
+ # DATA_FILE = os.path.join("data", DATA_FILENAME)
11
 
12
  HF_TOKEN = os.environ.get("HF_TOKEN")
13
  repo = Repository(
14
+ clone_from=DATASET_REPO_URL, use_auth_token=HF_TOKEN
15
  )
16
 
17
  def pad_buffer(audio):
 
29
  voice="Arnold",
30
  model="eleven_monolingual_v1"
31
  )
32
+ save(audio,'audio.mp4')
33
  commit_url = repo.push_to_hub()
34
  return (commit_url)
35
  # return (44100, np.frombuffer(pad_buffer(audio), dtype=np.int16))