diff --git a/www/app/[domain]/transcripts/topicList.tsx b/www/app/[domain]/transcripts/topicList.tsx index 4fedacb0..d10cb13f 100644 --- a/www/app/[domain]/transcripts/topicList.tsx +++ b/www/app/[domain]/transcripts/topicList.tsx @@ -104,15 +104,26 @@ export function TopicList({ {activeTopic?.id == topic.id && (
- {topic.segments.map((segment, index) => ( -

- [{formatTime(segment.timestamp)}] Speaker{" "} - {segment.speaker}: {segment.text} -

- ))} + {topic.segments ? ( + <> + {topic.segments.map((segment, index: number) => ( +

+ + [{formatTime(segment.start)}] + + +  Speaker {segment.speaker} + + {segment.text} +

+ ))} + + ) : ( + <>{topic.text} + )}
)} diff --git a/www/app/[domain]/transcripts/webSocketTypes.ts b/www/app/[domain]/transcripts/webSocketTypes.ts index 3e02e26a..abc67b33 100644 --- a/www/app/[domain]/transcripts/webSocketTypes.ts +++ b/www/app/[domain]/transcripts/webSocketTypes.ts @@ -9,6 +9,7 @@ export type Topic = { title: string; summary: string; id: string; + text: string; segments: SegmentTopic[]; }; diff --git a/www/app/api/.openapi-generator/FILES b/www/app/api/.openapi-generator/FILES index 9192cb1f..532a6a16 100644 --- a/www/app/api/.openapi-generator/FILES +++ b/www/app/api/.openapi-generator/FILES @@ -5,11 +5,11 @@ models/AudioWaveform.ts models/CreateTranscript.ts models/DeletionStatus.ts models/GetTranscript.ts +models/GetTranscriptSegmentTopic.ts +models/GetTranscriptTopic.ts models/HTTPValidationError.ts models/PageGetTranscript.ts models/RtcOffer.ts -models/TranscriptSegmentTopic.ts -models/TranscriptTopic.ts models/UpdateTranscript.ts models/UserInfo.ts models/ValidationError.ts diff --git a/www/app/api/models/GetTranscriptSegmentTopic.ts b/www/app/api/models/GetTranscriptSegmentTopic.ts new file mode 100644 index 00000000..cc2049b1 --- /dev/null +++ b/www/app/api/models/GetTranscriptSegmentTopic.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from "../runtime"; +/** + * + * @export + * @interface GetTranscriptSegmentTopic + */ +export interface GetTranscriptSegmentTopic { + /** + * + * @type {any} + * @memberof GetTranscriptSegmentTopic + */ + text: any | null; + /** + * + * @type {any} + * @memberof GetTranscriptSegmentTopic + */ + start: any | null; + /** + * + * @type {any} + * @memberof GetTranscriptSegmentTopic + */ + speaker: any | null; +} + +/** + * Check if a given object implements the GetTranscriptSegmentTopic interface. + */ +export function instanceOfGetTranscriptSegmentTopic(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "text" in value; + isInstance = isInstance && "start" in value; + isInstance = isInstance && "speaker" in value; + + return isInstance; +} + +export function GetTranscriptSegmentTopicFromJSON( + json: any, +): GetTranscriptSegmentTopic { + return GetTranscriptSegmentTopicFromJSONTyped(json, false); +} + +export function GetTranscriptSegmentTopicFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GetTranscriptSegmentTopic { + if (json === undefined || json === null) { + return json; + } + return { + text: json["text"], + start: json["start"], + speaker: json["speaker"], + }; +} + +export function GetTranscriptSegmentTopicToJSON( + value?: GetTranscriptSegmentTopic | null, +): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + text: value.text, + start: value.start, + speaker: value.speaker, + }; +} diff --git a/www/app/api/models/GetTranscriptTopic.ts b/www/app/api/models/GetTranscriptTopic.ts new file mode 100644 index 00000000..7a7d4c90 --- /dev/null +++ b/www/app/api/models/GetTranscriptTopic.ts @@ -0,0 +1,103 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from "../runtime"; +/** + * + * @export + * @interface GetTranscriptTopic + */ +export interface GetTranscriptTopic { + /** + * + * @type {any} + * @memberof GetTranscriptTopic + */ + title: any | null; + /** + * + * @type {any} + * @memberof GetTranscriptTopic + */ + summary: any | null; + /** + * + * @type {any} + * @memberof GetTranscriptTopic + */ + timestamp: any | null; + /** + * + * @type {any} + * @memberof GetTranscriptTopic + */ + text: any | null; + /** + * + * @type {any} + * @memberof GetTranscriptTopic + */ + segments?: any | null; +} + +/** + * Check if a given object implements the GetTranscriptTopic interface. + */ +export function instanceOfGetTranscriptTopic(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "title" in value; + isInstance = isInstance && "summary" in value; + isInstance = isInstance && "timestamp" in value; + isInstance = isInstance && "text" in value; + + return isInstance; +} + +export function GetTranscriptTopicFromJSON(json: any): GetTranscriptTopic { + return GetTranscriptTopicFromJSONTyped(json, false); +} + +export function GetTranscriptTopicFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GetTranscriptTopic { + if (json === undefined || json === null) { + return json; + } + return { + title: json["title"], + summary: json["summary"], + timestamp: json["timestamp"], + text: json["text"], + segments: !exists(json, "segments") ? undefined : json["segments"], + }; +} + +export function GetTranscriptTopicToJSON( + value?: GetTranscriptTopic | null, +): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + title: value.title, + summary: value.summary, + timestamp: value.timestamp, + text: value.text, + segments: value.segments, + }; +} diff --git a/www/app/api/models/index.ts b/www/app/api/models/index.ts index 6a7d7318..9e691b09 100644 --- a/www/app/api/models/index.ts +++ b/www/app/api/models/index.ts @@ -4,11 +4,11 @@ export * from "./AudioWaveform"; export * from "./CreateTranscript"; export * from "./DeletionStatus"; export * from "./GetTranscript"; +export * from "./GetTranscriptSegmentTopic"; +export * from "./GetTranscriptTopic"; export * from "./HTTPValidationError"; export * from "./PageGetTranscript"; export * from "./RtcOffer"; -export * from "./TranscriptSegmentTopic"; -export * from "./TranscriptTopic"; export * from "./UpdateTranscript"; export * from "./UserInfo"; export * from "./ValidationError";