Spaces:
Running
Running
Update app.py
Browse files- __pycache__/analyze.cpython-310.pyc +0 -0
- __pycache__/process.cpython-310.pyc +0 -0
- __pycache__/transcription.cpython-310.pyc +0 -0
- app.py +3 -4
- transcription.py +2 -2
__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 |
-
|
100 |
-
|
101 |
-
transcription_text = transcripter.create_transcription(
|
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 |
-
#ファイルの書き込み。ファイル名は"
|
49 |
-
output_file=os.path.join(self.output_dir,
|
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:
|