Close active transcription session
curl --request POST \
--url http://{device-ip}:{device-port}/audio-analytics/v1/api/transcriptions/closeimport requests
url = "http://{device-ip}:{device-port}/audio-analytics/v1/api/transcriptions/close"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('http://{device-ip}:{device-port}/audio-analytics/v1/api/transcriptions/close', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "http://{device-ip}:{device-port}/audio-analytics/v1/api/transcriptions/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://{device-ip}:{device-port}/audio-analytics/v1/api/transcriptions/close"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://{device-ip}:{device-port}/audio-analytics/v1/api/transcriptions/close")
.asString();require 'uri'
require 'net/http'
url = URI("http://{device-ip}:{device-port}/audio-analytics/v1/api/transcriptions/close")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"status": "closed"
}{
"error": {
"message": "Invalid request, missing 'file' parameter",
"type": "invalid_request_error",
"param": "file",
"code": null
}
}Close active transcription session
Ends the current transcription session and releases server resources.
Call this after receiving transcript.text.done to cleanly close the session.
Sessions are also automatically closed after a period of inactivity.
POST
/
transcriptions
/
close
Close active transcription session
curl --request POST \
--url http://{device-ip}:{device-port}/audio-analytics/v1/api/transcriptions/closeimport requests
url = "http://{device-ip}:{device-port}/audio-analytics/v1/api/transcriptions/close"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('http://{device-ip}:{device-port}/audio-analytics/v1/api/transcriptions/close', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "http://{device-ip}:{device-port}/audio-analytics/v1/api/transcriptions/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://{device-ip}:{device-port}/audio-analytics/v1/api/transcriptions/close"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://{device-ip}:{device-port}/audio-analytics/v1/api/transcriptions/close")
.asString();require 'uri'
require 'net/http'
url = URI("http://{device-ip}:{device-port}/audio-analytics/v1/api/transcriptions/close")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"status": "closed"
}{
"error": {
"message": "Invalid request, missing 'file' parameter",
"type": "invalid_request_error",
"param": "file",
"code": null
}
}Response
Session closed successfully
Example:
"closed"
Was this page helpful?
⌘I

