update english criterias, skill
This commit is contained in:
parent
4764b4cb6e
commit
b263661b9f
7 changed files with 427 additions and 677 deletions
|
|
@ -21,7 +21,7 @@ def transcribe_file(
|
|||
text=True,
|
||||
check=True,
|
||||
encoding="utf-8",
|
||||
timeout=timeout_seconds, # Добавлен таймаут
|
||||
timeout=timeout_seconds,
|
||||
)
|
||||
# Предполагаем, что скрипт выводит транскрипцию в stdout
|
||||
transcript = result.stdout.strip()
|
||||
|
|
@ -41,10 +41,10 @@ def transcribe_file(
|
|||
def main():
|
||||
# Пути
|
||||
base_dir = Path(
|
||||
r"/mnt/c/proga/projects/ege-skill-dev/.scans/Сложные работы_Английский_язык_УЧ_часть_1/"
|
||||
r"/mnt/c/proga/projects/ege-skill-dev/.scans/Сложные работы_Английский язык УЧ часть 1/"
|
||||
)
|
||||
regions = ["1-Республика_Адыгея", "2-Республика_Башкортостан"]
|
||||
recognizer_script = Path.home() / "zeroclaw-bot" / "recognition.py"
|
||||
regions = ["1-Республика Адыгея"]
|
||||
recognizer_script = Path.home() / ".zeroclaw" / "workspace" / "skills" / "ege-checker" / "recognition.py"
|
||||
|
||||
# Таймаут на транскрипцию одного файла (в секундах)
|
||||
TIMEOUT_PER_FILE = 120
|
||||
|
|
@ -109,8 +109,15 @@ def main():
|
|||
|
||||
# Сохраняем JSON
|
||||
output_file = Path.cwd() / "transcriptions.json"
|
||||
if Path.exists(output_file):
|
||||
with open(output_file, "r", encoding="utf-8") as f:
|
||||
results_to_file: list = json.load(f)
|
||||
results_to_file.extend(results)
|
||||
else:
|
||||
results_to_file = results
|
||||
|
||||
with open(output_file, "w", encoding="utf-8") as f:
|
||||
json.dump(results, f, ensure_ascii=False, indent=2)
|
||||
json.dump(results_to_file, f, ensure_ascii=False, indent=2)
|
||||
|
||||
# Статистика
|
||||
total_files = len(results)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue