该仓库包含用于自动评估和评分 TOEFL 口语回答的脚本。它根据语言使用和主题发展计算原始分数,并将其转换为 TOEFL 标准分数。输出结果以 CSV 和 Excel 格式保存。
English: This script evaluates student responses to TOEFL speaking tasks. It uses OpenAI's API to generate feedback based on rubrics for language use and topic development. The script reads student responses from text files and saves the feedback in JSON format.
Input:
- Task number (1, 2, 3, or 4).
- Student response text files (one per student).
- Rubric for language use and topic development (integrated in the script).
Output:
- JSON file containing the original student responses and the generated feedback.
Chinese: 该脚本用于评估学生对 TOEFL 口语任务的回答。它使用 OpenAI 的 API 根据语言使用和主题发展标准生成反馈。脚本从文本文件中读取学生回答,并将反馈保存为 JSON 格式。
输入:
- 任务编号(1、2、3 或 4)。
- 学生回答文本文件(每个学生一个文件)。
- 语言使用和主题发展标准(集成在脚本中)。
输出:
- 包含学生原始回答和生成反馈的 JSON 文件。
English: This script processes the feedback generated in Part 1. It extracts language use and topic development scores, computes overall scores for each student, and highlights differences between the original and revised responses. The results are saved in Excel, CSV, and HTML formats.
Input:
- JSON file containing student responses and feedback (generated by Part 1).
Output:
- Excel file with feedback details.
- CSV file with feedback details.
- HTML file with highlighted differences between original and revised responses.
Chinese: 该脚本处理在第一部分生成的反馈。它提取语言使用和主题发展评分,计算每个学生的总体得分,并突出显示原始回答和修订后的回答之间的差异。结果以 Excel、CSV 和 HTML 格式保存。
输入:
- 包含学生回答和反馈的 JSON 文件(由第一部分生成)。
输出:
- 包含反馈详细信息的 Excel 文件。
- 包含反馈详细信息的 CSV 文件。
- 突出显示原始和修订回答之间差异的 HTML 文件。
English: This script calculates the total raw scores and TOEFL scaled scores based on the feedback processed in Part 2. It reads multiple JSON files for different tasks, calculates the total raw score for each student across all tasks, converts these raw scores into TOEFL scaled scores, and saves the results in CSV and Excel formats.
Input:
- JSON files from Part 1 containing feedback for Tasks 1, 2, 3, and 4.
Output:
- CSV file with student names, TOEFL scores, and total raw scores.
- Excel file with the same data.
Chinese: 该脚本根据第二部分处理的反馈计算总原始分数和 TOEFL 标准分数。它读取不同任务的多个 JSON 文件,计算每个学生在所有任务中的总原始分数,将这些原始分数转换为 TOEFL 标准分数,并将结果保存为 CSV 和 Excel 格式。
输入:
- 来自第一部分的 JSON 文件,包含任务 1、2、3 和 4 的反馈。
输出:
- 包含学生姓名、TOEFL 分数和总原始分数的 CSV 文件。
- 包含相同数据的 Excel 文件。
功能说明 - 第四部分:跟读音频生成
This script generates personalized shadowing audios for students based on their modified responses from the TOEFL speaking tasks. The script reads the student names, genders, and modified responses from JSON files. It then uses OpenAI's Text-to-Speech API to create audio files, with male students receiving an "Alloy" voice and female students receiving a "Nova" voice. The audio files are saved in a designated folder for each task.
该脚本根据学生在托福口语任务中的修改后的回答生成个性化的跟读音频。脚本从JSON文件中读取学生姓名、性别和修改后的回答,然后使用OpenAI的语音合成API创建音频文件,其中男学生使用“Alloy”声音,女学生使用“Nova”声音。音频文件会被保存在每个任务指定的文件夹中。
Input:
- JSON file with task responses (e.g.,
task1_responses.json
) - JSON file with student names and genders (e.g.,
student_gender_map.json
)
输入:
- 含有任务回复的JSON文件(如
task1_responses.json
) - 含有学生姓名和性别的JSON文件(如
student_gender_map.json
)
Output:
- Audio files for each student's modified response saved in folders like
task1_modified_audios/
with filenames in the formattask1_{student_name}_shadowing.wav
.
输出:
- 每个学生修改后的回答的音频文件保存在类似
task1_modified_audios/
的文件夹中,文件名格式为task1_{student_name}_shadowing.wav
。