Skip to content

Commit b6e52d3

Browse files
committed
docs: remove unwanted section
1 parent b3aff32 commit b6e52d3

File tree

1 file changed

+0
-94
lines changed

1 file changed

+0
-94
lines changed

docs/transcript.md

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -239,97 +239,3 @@ All formats resolve speaker IDs to participant names when available:
239239
- If a participant exists for the speaker ID, their name is used
240240
- If no participant exists, a default name like "Speaker 0" is generated
241241
- Speaker IDs are integers (0, 1, 2, etc.) assigned during diarization
242-
243-
## Edge Cases
244-
245-
### Empty Transcripts
246-
247-
For transcripts with no topics or empty word lists:
248-
249-
- **text**: Returns empty string `""`
250-
- **text-timestamped**: Returns empty string `""`
251-
- **webvtt-named**: Returns minimal WebVTT header `"WEBVTT\n\n"`
252-
- **json**: Returns empty array `[]`
253-
254-
### Multiple Speaker Changes
255-
256-
All formats properly handle conversations with multiple speaker changes within a single topic, creating new segments when the speaker changes.
257-
258-
## Examples
259-
260-
### Using curl
261-
262-
```bash
263-
# Get plain text format (default)
264-
curl "https://api.reflector.com/v1/transcripts/abc123"
265-
266-
# Get timestamped text
267-
curl "https://api.reflector.com/v1/transcripts/abc123?transcript_format=text-timestamped"
268-
269-
# Get WebVTT for subtitles
270-
curl "https://api.reflector.com/v1/transcripts/abc123?transcript_format=webvtt-named" > subtitles.vtt
271-
272-
# Get JSON for processing
273-
curl "https://api.reflector.com/v1/transcripts/abc123?transcript_format=json"
274-
```
275-
276-
### Using JavaScript/TypeScript
277-
278-
```typescript
279-
// Using fetch API
280-
const response = await fetch(
281-
`https://api.reflector.com/v1/transcripts/${id}?transcript_format=json`
282-
);
283-
const data = await response.json();
284-
285-
// Type-safe access with discriminated union
286-
switch (data.transcript_format) {
287-
case "text":
288-
case "text-timestamped":
289-
case "webvtt-named":
290-
console.log("Text content:", data.transcript);
291-
break;
292-
case "json":
293-
data.transcript.forEach(segment => {
294-
console.log(`${segment.speaker_name}: ${segment.text}`);
295-
});
296-
break;
297-
}
298-
```
299-
300-
### Using Python
301-
302-
```python
303-
import requests
304-
305-
# Get JSON format
306-
response = requests.get(
307-
f"https://api.reflector.com/v1/transcripts/{transcript_id}",
308-
params={"transcript_format": "json"}
309-
)
310-
data = response.json()
311-
312-
# Process segments
313-
for segment in data["transcript"]:
314-
print(f"[{segment['start']:.1f}s] {segment['speaker_name']}: {segment['text']}")
315-
```
316-
317-
## Migration Notes
318-
319-
### Backward Compatibility
320-
321-
The GET `/v1/transcripts/{id}` endpoint previously returned transcript metadata without formatted transcript content. Adding the `transcript_format` parameter is fully backward compatible:
322-
323-
- Without the parameter, the default `text` format is returned
324-
- All existing response fields remain unchanged
325-
- The `transcript_format` and `transcript` fields are new additions
326-
327-
### Upgrading Client Code
328-
329-
To use the new format feature:
330-
331-
1. Add `transcript_format` query parameter to your requests
332-
2. Handle the discriminated union response type
333-
3. Access the `transcript` field based on the format
334-
335-
Existing code that doesn't use these new fields will continue to work unchanged.

0 commit comments

Comments
 (0)