{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# investigate easycom transcript\n", "# transcript jisoo gaved me is not align what I got\n", "# I want to know whether there are overlap or not" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "/home/junhyeok/projects/turn-taking-dataset/notebooks\n", "27582\n", "6895\n" ] } ], "source": [ "import json\n", "import os\n", "import numpy as np\n", "\n", "print(os.getcwd())\n", "ts_dir = '../mmaction2/data/EasyComDataset_fix/Main/Speech_Transcriptions/val/Session_1/'\n", "\n", "ts_list = os.listdir(ts_dir)\n", "ts_list.sort()\n", "\n", "sum_end_frame = 0\n", "\n", "for ts_path in ts_list:\n", " with open(os.path.join(ts_dir, ts_path), 'r') as f:\n", " ts = json.load(f)\n", " \n", " max_end_frame = 0\n", " for utt in ts:\n", " if utt['End_Frame'] > max_end_frame:\n", " max_end_frame = utt['End_Frame']\n", " \n", " sum_end_frame += max_end_frame\n", "\n", "print(sum_end_frame)\n", "print(sum_end_frame//4)\n", " \n", " \n" ] } ], "metadata": { "kernelspec": { "display_name": "ttd", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.17" } }, "nbformat": 4, "nbformat_minor": 2 }