A-yum1 commited on
Commit
30f99ab
·
1 Parent(s): 527491b

Update app.py

Browse files
__pycache__/analyze.cpython-310.pyc CHANGED
Binary files a/__pycache__/analyze.cpython-310.pyc and b/__pycache__/analyze.cpython-310.pyc differ
 
__pycache__/process.cpython-310.pyc CHANGED
Binary files a/__pycache__/process.cpython-310.pyc and b/__pycache__/process.cpython-310.pyc differ
 
__pycache__/transcription.cpython-310.pyc CHANGED
Binary files a/__pycache__/transcription.cpython-310.pyc and b/__pycache__/transcription.cpython-310.pyc differ
 
app.py CHANGED
@@ -96,10 +96,9 @@ def reset_member():
96
  def transcription():
97
  global transcription_text
98
  global total_audio
99
- print(total_audio)
100
- try:
101
- transcription_text = transcripter.create_transcription(total_audio)
102
- print(transcription_text)
103
  with open(transcription_text,'r',encoding='utf-8') as file:
104
  file_content = file.read()
105
  print(file_content)
 
96
  def transcription():
97
  global transcription_text
98
  global total_audio
99
+ try:
100
+ audio_directory = transcripter.merge_segments(total_audio)
101
+ transcription_text = transcripter.create_transcription(audio_directory)
 
102
  with open(transcription_text,'r',encoding='utf-8') as file:
103
  file_content = file.read()
104
  print(file_content)
transcription.py CHANGED
@@ -45,8 +45,8 @@ class TranscriptionMaker():
45
  "end": segment.end,
46
  "text": segment.text
47
  })
48
- #ファイルの書き込み。ファイル名は"読み込みディレクトリ名_transcription.txt"
49
- output_file=os.path.join(self.output_dir,os.path.basename(audio_directory)+"_transcription.txt")
50
  try:
51
  with open(output_file,"w",encoding="utf-8") as f:
52
  for result in results:
 
45
  "end": segment.end,
46
  "text": segment.text
47
  })
48
+ #ファイルの書き込み。ファイル名は"transcription.txt"
49
+ output_file=os.path.join(self.output_dir,"transcription.txt")
50
  try:
51
  with open(output_file,"w",encoding="utf-8") as f:
52
  for result in results: