OuroborosM commited on
Commit
ed94ada
·
1 Parent(s): e1714d2

update sound files

Browse files
Files changed (2) hide show
  1. app.py +4 -1
  2. requirements.txt +1 -1
app.py CHANGED
@@ -42,6 +42,7 @@ import glob
42
  from typing import List
43
  from multiprocessing import Pool
44
  from tqdm import tqdm
 
45
 
46
  from langchain.document_loaders import (
47
  CSVLoader,
@@ -898,7 +899,9 @@ def playsound2():
898
  soundfilename = Filename_Chatbot
899
  print("soundfilename:", soundfilename)
900
  # return None
901
- playsound(soundfilename)
 
 
902
  except Exception as e:
903
  print("playsound error:", e)
904
  return None
 
42
  from typing import List
43
  from multiprocessing import Pool
44
  from tqdm import tqdm
45
+ from pygame import mixer
46
 
47
  from langchain.document_loaders import (
48
  CSVLoader,
 
899
  soundfilename = Filename_Chatbot
900
  print("soundfilename:", soundfilename)
901
  # return None
902
+ # playsound(soundfilename)
903
+ mixer.music.load(soundfilename)
904
+ mixer.music.play()
905
  except Exception as e:
906
  print("playsound error:", e)
907
  return None
requirements.txt CHANGED
@@ -10,5 +10,5 @@ azure-cognitiveservices-speech
10
  pymupdf
11
  ffmpeg
12
  playsound
13
- pygobject
14
  unstructured
 
10
  pymupdf
11
  ffmpeg
12
  playsound
13
+ pygame
14
  unstructured