Skip to content

Commit e1dca85

Browse files
committed
various async stt improvements
1 parent d6f3f12 commit e1dca85

File tree

14 files changed

+255
-447
lines changed

14 files changed

+255
-447
lines changed

apps/api/fly.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ strategy = "bluegreen"
99

1010
[env]
1111
PORT = "3001"
12+
API_BASE_URL = "https://api.char.com"
1213

1314
[http_service]
1415
processes = ['app']

apps/api/openapi.gen.json

Lines changed: 77 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -239,17 +239,53 @@
239239
}
240240
}
241241
},
242+
"/stt/start": {
243+
"post": {
244+
"tags": [
245+
"stt"
246+
],
247+
"operationId": "stt_start",
248+
"requestBody": {
249+
"content": {
250+
"application/json": {
251+
"schema": {
252+
"$ref": "#/components/schemas/StartRequest"
253+
}
254+
}
255+
},
256+
"required": true
257+
},
258+
"responses": {
259+
"200": {
260+
"description": "Pipeline started",
261+
"content": {
262+
"application/json": {
263+
"schema": {
264+
"$ref": "#/components/schemas/StartResponse"
265+
}
266+
}
267+
}
268+
},
269+
"401": {
270+
"description": "Unauthorized"
271+
},
272+
"500": {
273+
"description": "Internal error"
274+
}
275+
}
276+
}
277+
},
242278
"/stt/status/{pipeline_id}": {
243279
"get": {
244280
"tags": [
245281
"stt"
246282
],
247-
"operationId": "handler",
283+
"operationId": "stt_status",
248284
"parameters": [
249285
{
250286
"name": "pipeline_id",
251287
"in": "path",
252-
"description": "Pipeline ID (Restate workflow key)",
288+
"description": "Pipeline ID",
253289
"required": true,
254290
"schema": {
255291
"type": "string"
@@ -267,8 +303,11 @@
267303
}
268304
}
269305
},
270-
"502": {
271-
"description": "Restate service unavailable"
306+
"404": {
307+
"description": "Job not found"
308+
},
309+
"500": {
310+
"description": "Internal error"
272311
}
273312
}
274313
}
@@ -690,12 +729,36 @@
690729
"PipelineStatus": {
691730
"type": "string",
692731
"enum": [
693-
"QUEUED",
694-
"TRANSCRIBING",
695-
"DONE",
696-
"ERROR"
732+
"processing",
733+
"done",
734+
"error"
697735
]
698736
},
737+
"StartRequest": {
738+
"type": "object",
739+
"required": [
740+
"fileId"
741+
],
742+
"properties": {
743+
"fileId": {
744+
"type": "string"
745+
},
746+
"provider": {
747+
"type": "string"
748+
}
749+
}
750+
},
751+
"StartResponse": {
752+
"type": "object",
753+
"required": [
754+
"id"
755+
],
756+
"properties": {
757+
"id": {
758+
"type": "string"
759+
}
760+
}
761+
},
699762
"StartTrialReason": {
700763
"type": "string",
701764
"enum": [
@@ -738,54 +801,20 @@
738801
"null"
739802
]
740803
},
741-
"status": {
742-
"$ref": "#/components/schemas/PipelineStatus"
743-
},
744-
"tokens": {
745-
"type": [
746-
"array",
747-
"null"
748-
],
749-
"items": {
750-
"$ref": "#/components/schemas/TranscriptToken"
751-
}
752-
},
753-
"transcript": {
804+
"provider": {
754805
"type": [
755806
"string",
756807
"null"
757808
]
758-
}
759-
}
760-
},
761-
"TranscriptToken": {
762-
"type": "object",
763-
"required": [
764-
"text",
765-
"startMs",
766-
"endMs"
767-
],
768-
"properties": {
769-
"endMs": {
770-
"type": "integer",
771-
"format": "int64",
772-
"minimum": 0
773809
},
774-
"speaker": {
810+
"rawResult": {
775811
"type": [
776-
"integer",
812+
"object",
777813
"null"
778-
],
779-
"format": "int32",
780-
"minimum": 0
781-
},
782-
"startMs": {
783-
"type": "integer",
784-
"format": "int64",
785-
"minimum": 0
814+
]
786815
},
787-
"text": {
788-
"type": "string"
816+
"status": {
817+
"$ref": "#/components/schemas/PipelineStatus"
789818
}
790819
}
791820
},

0 commit comments

Comments
 (0)