renator commited on
Commit
a57b3cc
·
1 Parent(s): 1878138
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. texttovoice/views.py +3 -0
Dockerfile CHANGED
@@ -38,8 +38,8 @@ COPY packages/matching.py /usr/local/lib/python3.10/site-packages/librosa/util/m
38
  COPY packages/spectrum.py /usr/local/lib/python3.10/site-packages/librosa/core/spectrum.py
39
  COPY packages/pitch.py /usr/local/lib/python3.10/site-packages/librosa/core/pitch.py
40
  RUN chmod -R 777 /usr/local/lib/python3.10/site-packages/librosa \
41
- && chmod -R 777 /.local \
42
  && chmod 777 /tmp
 
43
 
44
  # Set the environment variable for the NUMBA cache directory
45
 
 
38
  COPY packages/spectrum.py /usr/local/lib/python3.10/site-packages/librosa/core/spectrum.py
39
  COPY packages/pitch.py /usr/local/lib/python3.10/site-packages/librosa/core/pitch.py
40
  RUN chmod -R 777 /usr/local/lib/python3.10/site-packages/librosa \
 
41
  && chmod 777 /tmp
42
+ # && chmod -R 777 /.local \
43
 
44
  # Set the environment variable for the NUMBA cache directory
45
 
texttovoice/views.py CHANGED
@@ -48,11 +48,14 @@ class TextToSpeechCreateView(CreateAPIView):
48
  output_filename = f"output_{uuid.uuid4()}.wav"
49
 
50
  try:
 
51
  # Save the uploaded speaker file to a temporary location
52
  speaker_file_path = os.path.join("/tmp", speaker_wav.name)
53
  with open(speaker_file_path, "wb") as destination:
54
  for chunk in speaker_wav.chunks():
55
  destination.write(chunk)
 
 
56
 
57
  # Generate speech using tts.tts_to_file
58
  tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2", gpu=False)
 
48
  output_filename = f"output_{uuid.uuid4()}.wav"
49
 
50
  try:
51
+ print("before creating the speaker file path")
52
  # Save the uploaded speaker file to a temporary location
53
  speaker_file_path = os.path.join("/tmp", speaker_wav.name)
54
  with open(speaker_file_path, "wb") as destination:
55
  for chunk in speaker_wav.chunks():
56
  destination.write(chunk)
57
+
58
+ print("after creating the speaker file path",speaker_file_path)
59
 
60
  # Generate speech using tts.tts_to_file
61
  tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2", gpu=False)