File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,13 +17,15 @@ export class Transcriber {
1717 */
1818 async preRecorded (
1919 source : TranscriptionSource ,
20- options ?: PrerecordedTranscriptionOptions
20+ options ?: PrerecordedTranscriptionOptions ,
21+ endpoint ?: string = "v1/listen"
2122 ) : Promise < PrerecordedTranscriptionResponse > {
2223 return await preRecordedTranscription (
2324 this . _credentials ,
2425 this . _apiUrl || "" ,
2526 source ,
26- options
27+ options ,
28+ endpoint
2729 ) ;
2830 }
2931
Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ export const preRecordedTranscription = async (
4040 apiKey : string ,
4141 apiUrl : string ,
4242 source : TranscriptionSource ,
43- options ?: PrerecordedTranscriptionOptions
43+ options ?: PrerecordedTranscriptionOptions ,
44+ endpoint ?: string
4445) : Promise < PrerecordedTranscriptionResponse > => {
4546 const transcriptionOptions = { ...{ } , ...options } ;
4647
@@ -75,7 +76,7 @@ export const preRecordedTranscription = async (
7576 "POST" ,
7677 apiKey ,
7778 apiUrl ,
78- `/v1/listen ?${ querystring . stringify ( transcriptionOptions ) } ` ,
79+ `/${ endpoint } ?${ querystring . stringify ( transcriptionOptions ) } ` ,
7980 body ,
8081 requestOptions
8182 ) ;
You can’t perform that action at this time.
0 commit comments