音声ストリーミング API¶
StartAudioStreaming¶
- x-sora-target:
Sora_20221221.StartAudioStreaming
セッションが存在し、音声ストリーミングが開始していないチャネルに対して音声ストリーミングを開始します。
キー |
型 |
---|---|
channel_id |
string |
$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20221221.StartAudioStreaming \
channel_id=sora \
-vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 22
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.6.0
x-sora-target: Sora_20221221.StartAudioStreaming
{
"channel_id": "sora"
}
HTTP/1.1 200 OK
content-length: 43
content-type: application/json
date: Thu, 15 Dec 2022 06:21:40 GMT
server: Cowboy
{
"session_id": "MPXNY180M175Z69YY9FZFJ0QWR"
}
StopAudioStreaming¶
- x-sora-target:
Sora_20221221.StopAudioStreaming
セッションが存在し、音声ストリーミングが開始しているチャネルに対して音声ストリーミングを停止します。
キー |
型 |
---|---|
channel_id |
string |
$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20221221.StopAudioStreaming \
channel_id=sora \
-vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 22
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.6.0
x-sora-target: Sora_20221221.StopAudioStreaming
{
"channel_id": "sora"
}
HTTP/1.1 200 OK
content-length: 43
content-type: application/json
date: Thu, 15 Dec 2022 06:21:58 GMT
server: Cowboy
{
"session_id": "MPXNY180M175Z69YY9FZFJ0QWR"
}
SubscribeAudioStreamingResultPush¶
- x-sora-target:
Sora_20221221.SubscribeAudioStreamingResultPush
音声ストリーミングサーバーからの戻り値のプッシュ通知を指定した接続が購読するよう設定します。
キー |
型 |
---|---|
channel_id |
string |
connection_id |
string |
$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20221221.SubscribeAudioStreamingResultPush \
channel_id=sora \
connection_id=AT10T0WHH94PHEM3M5F45QFGRW \
-vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 69
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.6.0
x-sora-target: Sora_20221221.SubscribeAudioStreamingResultPush
{
"channel_id": "sora",
"connection_id": "AT10T0WHH94PHEM3M5F45QFGRW"
}
HTTP/1.1 200 OK
content-length: 66
content-type: application/json
date: Thu, 15 Dec 2022 06:26:32 GMT
server: Cowboy
{
"channel_id": "sora",
"connection_id": "AT10T0WHH94PHEM3M5F45QFGRW"
}
UnsubscribeAudioStreamingResultPush¶
- x-sora-target:
Sora_20221221.UnsubscribeAudioStreamingResultPush
音声ストリーミングサーバーからの戻り値のプッシュ通知を指定した接続が購読しないよう設定します。
キー |
型 |
---|---|
channel_id |
string |
connection_id |
string |
$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20221221.UnsubscribeAudioStreamingResultPush \
channel_id=sora \
connection_id=4D83B8APHS4JX03C8SZ3176SBM \
-vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 69
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.6.0
x-sora-target: Sora_20221221.UnsubscribeAudioStreamingResultPush
{
"channel_id": "sora",
"connection_id": "4D83B8APHS4JX03C8SZ3176SBM"
}
HTTP/1.1 200 OK
content-length: 66
content-type: application/json
date: Thu, 15 Dec 2022 06:28:22 GMT
server: Cowboy
{
"channel_id": "sora",
"connection_id": "4D83B8APHS4JX03C8SZ3176SBM"
}
ListAudioStreamingResultPushState¶
- x-sora-target:
Sora_20230628.ListAudioStreamingResultPushState
指定したチャネルのセッションのコネクション毎のサブスクライブの状態を表示します。
キー |
型 |
---|---|
channel_id |
string |
$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20230628.ListAudioStreamingResultPushState \
channel_id=sora \
-vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 22
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.6.0
x-sora-target: Sora_20230628.ListAudioStreamingResultPushState
{
"channel_id": "sora"
}
HTTP/1.1 200 OK
content-length: 195
content-type: application/json
date: Thu, 18 May 2023 02:30:34 GMT
server: Cowboy
[
{
"connection_id": "B2JPGFZPMD3H973Y811MF8ZZ70",
"subscribe": true
},
{
"connection_id": "KT116Z11KX5Y547KA1V12HW8PG",
"subscribe": false
},
{
"connection_id": "A5GYXGRYAX6590M3AFH7F9Z2H4",
"subscribe": false
}
]