@digipair/skill-heygen 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.d.ts +1 -0
- package/index.cjs.js +124 -0
- package/index.d.ts +1 -0
- package/index.esm.js +116 -0
- package/libs/skill-heygen/src/index.d.ts +1 -0
- package/libs/skill-heygen/src/lib/skill-heygen.d.ts +6 -0
- package/package.json +7 -0
- package/schema.fr.json +241 -0
- package/schema.json +241 -0
package/index.cjs.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./src/index";
|
package/index.cjs.js
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */ let HeygenService = class HeygenService {
|
|
6
|
+
async newSession(params, _pinsSettingsList, context) {
|
|
7
|
+
var _context_privates_HEYGEN_SERVER_URL, _context_privates_HEYGEN_API_KEY;
|
|
8
|
+
const { serverUrl = (_context_privates_HEYGEN_SERVER_URL = context.privates.HEYGEN_SERVER_URL) != null ? _context_privates_HEYGEN_SERVER_URL : process.env['HEYGEN_SERVER_URL'], apiKey = (_context_privates_HEYGEN_API_KEY = context.privates.HEYGEN_API_KEY) != null ? _context_privates_HEYGEN_API_KEY : process.env['HEYGEN_API_KEY'], quality = 'low', avatar = '', voice = '' } = params;
|
|
9
|
+
const response = await fetch(`${serverUrl}/v1/streaming.new`, {
|
|
10
|
+
method: 'POST',
|
|
11
|
+
headers: {
|
|
12
|
+
'Content-Type': 'application/json',
|
|
13
|
+
'X-Api-Key': apiKey
|
|
14
|
+
},
|
|
15
|
+
body: JSON.stringify({
|
|
16
|
+
quality,
|
|
17
|
+
avatar_name: avatar,
|
|
18
|
+
voice: {
|
|
19
|
+
voice_id: voice
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
if (response.status === 500) {
|
|
24
|
+
throw new Error('Server error');
|
|
25
|
+
} else {
|
|
26
|
+
const data = await response.json();
|
|
27
|
+
return data.data;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
async handleICE(params, _pinsSettingsList, context) {
|
|
31
|
+
var _context_privates_HEYGEN_SERVER_URL, _context_privates_HEYGEN_API_KEY;
|
|
32
|
+
const { serverUrl = (_context_privates_HEYGEN_SERVER_URL = context.privates.HEYGEN_SERVER_URL) != null ? _context_privates_HEYGEN_SERVER_URL : process.env['HEYGEN_SERVER_URL'], apiKey = (_context_privates_HEYGEN_API_KEY = context.privates.HEYGEN_API_KEY) != null ? _context_privates_HEYGEN_API_KEY : process.env['HEYGEN_API_KEY'], sessionId, candidate } = params;
|
|
33
|
+
const response = await fetch(`${serverUrl}/v1/streaming.ice`, {
|
|
34
|
+
method: 'POST',
|
|
35
|
+
headers: {
|
|
36
|
+
'Content-Type': 'application/json',
|
|
37
|
+
'X-Api-Key': apiKey
|
|
38
|
+
},
|
|
39
|
+
body: JSON.stringify({
|
|
40
|
+
session_id: sessionId,
|
|
41
|
+
candidate
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
if (response.status === 500) {
|
|
45
|
+
throw new Error('Server error');
|
|
46
|
+
} else {
|
|
47
|
+
const data = await response.json();
|
|
48
|
+
return data;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
async startSession(params, _pinsSettingsList, context) {
|
|
52
|
+
var _context_privates_HEYGEN_SERVER_URL, _context_privates_HEYGEN_API_KEY;
|
|
53
|
+
const { serverUrl = (_context_privates_HEYGEN_SERVER_URL = context.privates.HEYGEN_SERVER_URL) != null ? _context_privates_HEYGEN_SERVER_URL : process.env['HEYGEN_SERVER_URL'], apiKey = (_context_privates_HEYGEN_API_KEY = context.privates.HEYGEN_API_KEY) != null ? _context_privates_HEYGEN_API_KEY : process.env['HEYGEN_API_KEY'], sessionId, sdp } = params;
|
|
54
|
+
const response = await fetch(`${serverUrl}/v1/streaming.start`, {
|
|
55
|
+
method: 'POST',
|
|
56
|
+
headers: {
|
|
57
|
+
'Content-Type': 'application/json',
|
|
58
|
+
'X-Api-Key': apiKey
|
|
59
|
+
},
|
|
60
|
+
body: JSON.stringify({
|
|
61
|
+
session_id: sessionId,
|
|
62
|
+
sdp
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
if (response.status === 500) {
|
|
66
|
+
throw new Error('Server error');
|
|
67
|
+
} else {
|
|
68
|
+
const data = await response.json();
|
|
69
|
+
return data.data;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
async talk(params, _pinsSettingsList, context) {
|
|
73
|
+
var _context_privates_HEYGEN_SERVER_URL, _context_privates_HEYGEN_API_KEY;
|
|
74
|
+
const { serverUrl = (_context_privates_HEYGEN_SERVER_URL = context.privates.HEYGEN_SERVER_URL) != null ? _context_privates_HEYGEN_SERVER_URL : process.env['HEYGEN_SERVER_URL'], apiKey = (_context_privates_HEYGEN_API_KEY = context.privates.HEYGEN_API_KEY) != null ? _context_privates_HEYGEN_API_KEY : process.env['HEYGEN_API_KEY'], sessionId, text } = params;
|
|
75
|
+
const response = await fetch(`${serverUrl}/v1/streaming.task`, {
|
|
76
|
+
method: 'POST',
|
|
77
|
+
headers: {
|
|
78
|
+
'Content-Type': 'application/json',
|
|
79
|
+
'X-Api-Key': apiKey
|
|
80
|
+
},
|
|
81
|
+
body: JSON.stringify({
|
|
82
|
+
session_id: sessionId,
|
|
83
|
+
text
|
|
84
|
+
})
|
|
85
|
+
});
|
|
86
|
+
if (response.status === 500) {
|
|
87
|
+
throw new Error('Server error');
|
|
88
|
+
} else {
|
|
89
|
+
const data = await response.json();
|
|
90
|
+
return data.data;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
async stop(params, _pinsSettingsList, context) {
|
|
94
|
+
var _context_privates_HEYGEN_SERVER_URL, _context_privates_HEYGEN_API_KEY;
|
|
95
|
+
const { serverUrl = (_context_privates_HEYGEN_SERVER_URL = context.privates.HEYGEN_SERVER_URL) != null ? _context_privates_HEYGEN_SERVER_URL : process.env['HEYGEN_SERVER_URL'], apiKey = (_context_privates_HEYGEN_API_KEY = context.privates.HEYGEN_API_KEY) != null ? _context_privates_HEYGEN_API_KEY : process.env['HEYGEN_API_KEY'], sessionId } = params;
|
|
96
|
+
const response = await fetch(`${serverUrl}/v1/streaming.stop`, {
|
|
97
|
+
method: 'POST',
|
|
98
|
+
headers: {
|
|
99
|
+
'Content-Type': 'application/json',
|
|
100
|
+
'X-Api-Key': apiKey
|
|
101
|
+
},
|
|
102
|
+
body: JSON.stringify({
|
|
103
|
+
session_id: sessionId
|
|
104
|
+
})
|
|
105
|
+
});
|
|
106
|
+
if (response.status === 500) {
|
|
107
|
+
throw new Error('Server error');
|
|
108
|
+
} else {
|
|
109
|
+
const data = await response.json();
|
|
110
|
+
return data.data;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const newSession = (params, pinsSettingsList, context)=>new HeygenService().newSession(params, pinsSettingsList, context);
|
|
115
|
+
const handleICE = (params, pinsSettingsList, context)=>new HeygenService().handleICE(params, pinsSettingsList, context);
|
|
116
|
+
const startSession = (params, pinsSettingsList, context)=>new HeygenService().startSession(params, pinsSettingsList, context);
|
|
117
|
+
const talk = (params, pinsSettingsList, context)=>new HeygenService().talk(params, pinsSettingsList, context);
|
|
118
|
+
const stop = (params, pinsSettingsList, context)=>new HeygenService().stop(params, pinsSettingsList, context);
|
|
119
|
+
|
|
120
|
+
exports.handleICE = handleICE;
|
|
121
|
+
exports.newSession = newSession;
|
|
122
|
+
exports.startSession = startSession;
|
|
123
|
+
exports.stop = stop;
|
|
124
|
+
exports.talk = talk;
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './libs/skill-heygen/src/index';
|
package/index.esm.js
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */ let HeygenService = class HeygenService {
|
|
2
|
+
async newSession(params, _pinsSettingsList, context) {
|
|
3
|
+
var _context_privates_HEYGEN_SERVER_URL, _context_privates_HEYGEN_API_KEY;
|
|
4
|
+
const { serverUrl = (_context_privates_HEYGEN_SERVER_URL = context.privates.HEYGEN_SERVER_URL) != null ? _context_privates_HEYGEN_SERVER_URL : process.env['HEYGEN_SERVER_URL'], apiKey = (_context_privates_HEYGEN_API_KEY = context.privates.HEYGEN_API_KEY) != null ? _context_privates_HEYGEN_API_KEY : process.env['HEYGEN_API_KEY'], quality = 'low', avatar = '', voice = '' } = params;
|
|
5
|
+
const response = await fetch(`${serverUrl}/v1/streaming.new`, {
|
|
6
|
+
method: 'POST',
|
|
7
|
+
headers: {
|
|
8
|
+
'Content-Type': 'application/json',
|
|
9
|
+
'X-Api-Key': apiKey
|
|
10
|
+
},
|
|
11
|
+
body: JSON.stringify({
|
|
12
|
+
quality,
|
|
13
|
+
avatar_name: avatar,
|
|
14
|
+
voice: {
|
|
15
|
+
voice_id: voice
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
if (response.status === 500) {
|
|
20
|
+
throw new Error('Server error');
|
|
21
|
+
} else {
|
|
22
|
+
const data = await response.json();
|
|
23
|
+
return data.data;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
async handleICE(params, _pinsSettingsList, context) {
|
|
27
|
+
var _context_privates_HEYGEN_SERVER_URL, _context_privates_HEYGEN_API_KEY;
|
|
28
|
+
const { serverUrl = (_context_privates_HEYGEN_SERVER_URL = context.privates.HEYGEN_SERVER_URL) != null ? _context_privates_HEYGEN_SERVER_URL : process.env['HEYGEN_SERVER_URL'], apiKey = (_context_privates_HEYGEN_API_KEY = context.privates.HEYGEN_API_KEY) != null ? _context_privates_HEYGEN_API_KEY : process.env['HEYGEN_API_KEY'], sessionId, candidate } = params;
|
|
29
|
+
const response = await fetch(`${serverUrl}/v1/streaming.ice`, {
|
|
30
|
+
method: 'POST',
|
|
31
|
+
headers: {
|
|
32
|
+
'Content-Type': 'application/json',
|
|
33
|
+
'X-Api-Key': apiKey
|
|
34
|
+
},
|
|
35
|
+
body: JSON.stringify({
|
|
36
|
+
session_id: sessionId,
|
|
37
|
+
candidate
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
if (response.status === 500) {
|
|
41
|
+
throw new Error('Server error');
|
|
42
|
+
} else {
|
|
43
|
+
const data = await response.json();
|
|
44
|
+
return data;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async startSession(params, _pinsSettingsList, context) {
|
|
48
|
+
var _context_privates_HEYGEN_SERVER_URL, _context_privates_HEYGEN_API_KEY;
|
|
49
|
+
const { serverUrl = (_context_privates_HEYGEN_SERVER_URL = context.privates.HEYGEN_SERVER_URL) != null ? _context_privates_HEYGEN_SERVER_URL : process.env['HEYGEN_SERVER_URL'], apiKey = (_context_privates_HEYGEN_API_KEY = context.privates.HEYGEN_API_KEY) != null ? _context_privates_HEYGEN_API_KEY : process.env['HEYGEN_API_KEY'], sessionId, sdp } = params;
|
|
50
|
+
const response = await fetch(`${serverUrl}/v1/streaming.start`, {
|
|
51
|
+
method: 'POST',
|
|
52
|
+
headers: {
|
|
53
|
+
'Content-Type': 'application/json',
|
|
54
|
+
'X-Api-Key': apiKey
|
|
55
|
+
},
|
|
56
|
+
body: JSON.stringify({
|
|
57
|
+
session_id: sessionId,
|
|
58
|
+
sdp
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
if (response.status === 500) {
|
|
62
|
+
throw new Error('Server error');
|
|
63
|
+
} else {
|
|
64
|
+
const data = await response.json();
|
|
65
|
+
return data.data;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
async talk(params, _pinsSettingsList, context) {
|
|
69
|
+
var _context_privates_HEYGEN_SERVER_URL, _context_privates_HEYGEN_API_KEY;
|
|
70
|
+
const { serverUrl = (_context_privates_HEYGEN_SERVER_URL = context.privates.HEYGEN_SERVER_URL) != null ? _context_privates_HEYGEN_SERVER_URL : process.env['HEYGEN_SERVER_URL'], apiKey = (_context_privates_HEYGEN_API_KEY = context.privates.HEYGEN_API_KEY) != null ? _context_privates_HEYGEN_API_KEY : process.env['HEYGEN_API_KEY'], sessionId, text } = params;
|
|
71
|
+
const response = await fetch(`${serverUrl}/v1/streaming.task`, {
|
|
72
|
+
method: 'POST',
|
|
73
|
+
headers: {
|
|
74
|
+
'Content-Type': 'application/json',
|
|
75
|
+
'X-Api-Key': apiKey
|
|
76
|
+
},
|
|
77
|
+
body: JSON.stringify({
|
|
78
|
+
session_id: sessionId,
|
|
79
|
+
text
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
if (response.status === 500) {
|
|
83
|
+
throw new Error('Server error');
|
|
84
|
+
} else {
|
|
85
|
+
const data = await response.json();
|
|
86
|
+
return data.data;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
async stop(params, _pinsSettingsList, context) {
|
|
90
|
+
var _context_privates_HEYGEN_SERVER_URL, _context_privates_HEYGEN_API_KEY;
|
|
91
|
+
const { serverUrl = (_context_privates_HEYGEN_SERVER_URL = context.privates.HEYGEN_SERVER_URL) != null ? _context_privates_HEYGEN_SERVER_URL : process.env['HEYGEN_SERVER_URL'], apiKey = (_context_privates_HEYGEN_API_KEY = context.privates.HEYGEN_API_KEY) != null ? _context_privates_HEYGEN_API_KEY : process.env['HEYGEN_API_KEY'], sessionId } = params;
|
|
92
|
+
const response = await fetch(`${serverUrl}/v1/streaming.stop`, {
|
|
93
|
+
method: 'POST',
|
|
94
|
+
headers: {
|
|
95
|
+
'Content-Type': 'application/json',
|
|
96
|
+
'X-Api-Key': apiKey
|
|
97
|
+
},
|
|
98
|
+
body: JSON.stringify({
|
|
99
|
+
session_id: sessionId
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
if (response.status === 500) {
|
|
103
|
+
throw new Error('Server error');
|
|
104
|
+
} else {
|
|
105
|
+
const data = await response.json();
|
|
106
|
+
return data.data;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
const newSession = (params, pinsSettingsList, context)=>new HeygenService().newSession(params, pinsSettingsList, context);
|
|
111
|
+
const handleICE = (params, pinsSettingsList, context)=>new HeygenService().handleICE(params, pinsSettingsList, context);
|
|
112
|
+
const startSession = (params, pinsSettingsList, context)=>new HeygenService().startSession(params, pinsSettingsList, context);
|
|
113
|
+
const talk = (params, pinsSettingsList, context)=>new HeygenService().talk(params, pinsSettingsList, context);
|
|
114
|
+
const stop = (params, pinsSettingsList, context)=>new HeygenService().stop(params, pinsSettingsList, context);
|
|
115
|
+
|
|
116
|
+
export { handleICE, newSession, startSession, stop, talk };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/skill-heygen';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PinsSettings } from '@digipair/engine';
|
|
2
|
+
export declare const newSession: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
3
|
+
export declare const handleICE: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
4
|
+
export declare const startSession: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
5
|
+
export declare const talk: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
6
|
+
export declare const stop: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
package/package.json
ADDED
package/schema.fr.json
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "@digipair/skill-heygen",
|
|
5
|
+
"summary": "Heygen API",
|
|
6
|
+
"description": "Cette compétence permet de gérer la communication avec les serveurs Heygen.",
|
|
7
|
+
"version": "0.1.0",
|
|
8
|
+
"x-icon": "🔗"
|
|
9
|
+
},
|
|
10
|
+
"paths": {
|
|
11
|
+
"/newSession": {
|
|
12
|
+
"post": {
|
|
13
|
+
"tags": ["service"],
|
|
14
|
+
"summary": "Créer une session Heygen",
|
|
15
|
+
"parameters": [
|
|
16
|
+
{
|
|
17
|
+
"name": "serverUrl",
|
|
18
|
+
"summary": "URL",
|
|
19
|
+
"required": false,
|
|
20
|
+
"description": "URL du serveur Heygen",
|
|
21
|
+
"schema": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "apiKey",
|
|
27
|
+
"summary": "Clé API Heygen",
|
|
28
|
+
"required": false,
|
|
29
|
+
"description": "Clé API Heygen",
|
|
30
|
+
"schema": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "quality",
|
|
36
|
+
"summary": "Qualité",
|
|
37
|
+
"required": false,
|
|
38
|
+
"description": "Qualité de la voix",
|
|
39
|
+
"schema": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "avatar",
|
|
45
|
+
"summary": "Avatar",
|
|
46
|
+
"required": false,
|
|
47
|
+
"description": "Avatar de la voix",
|
|
48
|
+
"schema": {
|
|
49
|
+
"type": "string"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "voice",
|
|
54
|
+
"summary": "Voix",
|
|
55
|
+
"required": false,
|
|
56
|
+
"description": "Voix de la voix",
|
|
57
|
+
"schema": {
|
|
58
|
+
"type": "string"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"x-events": []
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"/handleICE": {
|
|
66
|
+
"post": {
|
|
67
|
+
"tags": ["service"],
|
|
68
|
+
"summary": "ICE Heygen",
|
|
69
|
+
"parameters": [
|
|
70
|
+
{
|
|
71
|
+
"name": "serverUrl",
|
|
72
|
+
"summary": "URL",
|
|
73
|
+
"required": false,
|
|
74
|
+
"description": "URL du serveur Heygen",
|
|
75
|
+
"schema": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "apiKey",
|
|
81
|
+
"summary": "Clé API Heygen",
|
|
82
|
+
"required": false,
|
|
83
|
+
"description": "Clé API Heygen",
|
|
84
|
+
"schema": {
|
|
85
|
+
"type": "string"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "sessionId",
|
|
90
|
+
"summary": "Session",
|
|
91
|
+
"required": false,
|
|
92
|
+
"description": "ID de session",
|
|
93
|
+
"schema": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "candidate",
|
|
99
|
+
"summary": "Candidat ICE",
|
|
100
|
+
"required": false,
|
|
101
|
+
"description": "Candidat ICE",
|
|
102
|
+
"schema": {
|
|
103
|
+
"type": "object"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"x-events": []
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"/startSession": {
|
|
111
|
+
"post": {
|
|
112
|
+
"tags": ["service"],
|
|
113
|
+
"summary": "Démarrer la session Heygen",
|
|
114
|
+
"parameters": [
|
|
115
|
+
{
|
|
116
|
+
"name": "serverUrl",
|
|
117
|
+
"summary": "URL",
|
|
118
|
+
"required": false,
|
|
119
|
+
"description": "URL du serveur Heygen",
|
|
120
|
+
"schema": {
|
|
121
|
+
"type": "string"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "apiKey",
|
|
126
|
+
"summary": "Clé API Heygen",
|
|
127
|
+
"required": false,
|
|
128
|
+
"description": "Clé API Heygen",
|
|
129
|
+
"schema": {
|
|
130
|
+
"type": "string"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "sessionId",
|
|
135
|
+
"summary": "Session",
|
|
136
|
+
"required": false,
|
|
137
|
+
"description": "ID de session",
|
|
138
|
+
"schema": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "sdp",
|
|
144
|
+
"summary": "SDP",
|
|
145
|
+
"required": false,
|
|
146
|
+
"description": "SDP",
|
|
147
|
+
"schema": {
|
|
148
|
+
"type": "object"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
"x-events": []
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"/talk": {
|
|
156
|
+
"post": {
|
|
157
|
+
"tags": ["service"],
|
|
158
|
+
"summary": "Parler avec Heygen",
|
|
159
|
+
"parameters": [
|
|
160
|
+
{
|
|
161
|
+
"name": "serverUrl",
|
|
162
|
+
"summary": "URL",
|
|
163
|
+
"required": false,
|
|
164
|
+
"description": "URL du serveur Heygen",
|
|
165
|
+
"schema": {
|
|
166
|
+
"type": "string"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "apiKey",
|
|
171
|
+
"summary": "Clé API Heygen",
|
|
172
|
+
"required": false,
|
|
173
|
+
"description": "Clé API Heygen",
|
|
174
|
+
"schema": {
|
|
175
|
+
"type": "string"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "sessionId",
|
|
180
|
+
"summary": "Session",
|
|
181
|
+
"required": false,
|
|
182
|
+
"description": "ID de session",
|
|
183
|
+
"schema": {
|
|
184
|
+
"type": "string"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "text",
|
|
189
|
+
"summary": "Texte",
|
|
190
|
+
"required": false,
|
|
191
|
+
"description": "Texte à dire",
|
|
192
|
+
"schema": {
|
|
193
|
+
"type": "string"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"x-events": []
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"/stop": {
|
|
201
|
+
"post": {
|
|
202
|
+
"tags": ["service"],
|
|
203
|
+
"summary": "Arrêter la session Heygen",
|
|
204
|
+
"parameters": [
|
|
205
|
+
{
|
|
206
|
+
"name": "serverUrl",
|
|
207
|
+
"summary": "URL",
|
|
208
|
+
"required": false,
|
|
209
|
+
"description": "URL du serveur Heygen",
|
|
210
|
+
"schema": {
|
|
211
|
+
"type": "string"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"name": "apiKey",
|
|
216
|
+
"summary": "Clé API Heygen",
|
|
217
|
+
"required": false,
|
|
218
|
+
"description": "Clé API Heygen",
|
|
219
|
+
"schema": {
|
|
220
|
+
"type": "string"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"name": "sessionId",
|
|
225
|
+
"summary": "Session",
|
|
226
|
+
"required": false,
|
|
227
|
+
"description": "ID de session",
|
|
228
|
+
"schema": {
|
|
229
|
+
"type": "string"
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"x-events": []
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"components": {
|
|
238
|
+
"schemas": {}
|
|
239
|
+
},
|
|
240
|
+
"x-scene-blocks": {}
|
|
241
|
+
}
|
package/schema.json
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "@digipair/skill-heygen",
|
|
5
|
+
"summary": "Heygen API",
|
|
6
|
+
"description": "This skill allows managing communication with Heygen servers.",
|
|
7
|
+
"version": "0.1.0",
|
|
8
|
+
"x-icon": "🔗"
|
|
9
|
+
},
|
|
10
|
+
"paths": {
|
|
11
|
+
"/newSession": {
|
|
12
|
+
"post": {
|
|
13
|
+
"tags": ["service"],
|
|
14
|
+
"summary": "Create a Heygen session",
|
|
15
|
+
"parameters": [
|
|
16
|
+
{
|
|
17
|
+
"name": "serverUrl",
|
|
18
|
+
"summary": "URL",
|
|
19
|
+
"required": false,
|
|
20
|
+
"description": "Heygen server URL",
|
|
21
|
+
"schema": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "apiKey",
|
|
27
|
+
"summary": "Heygen API Key",
|
|
28
|
+
"required": false,
|
|
29
|
+
"description": "Heygen API Key",
|
|
30
|
+
"schema": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "quality",
|
|
36
|
+
"summary": "Quality",
|
|
37
|
+
"required": false,
|
|
38
|
+
"description": "Voice quality",
|
|
39
|
+
"schema": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "avatar",
|
|
45
|
+
"summary": "Avatar",
|
|
46
|
+
"required": false,
|
|
47
|
+
"description": "Voice avatar",
|
|
48
|
+
"schema": {
|
|
49
|
+
"type": "string"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "voice",
|
|
54
|
+
"summary": "Voice",
|
|
55
|
+
"required": false,
|
|
56
|
+
"description": "Voice voice",
|
|
57
|
+
"schema": {
|
|
58
|
+
"type": "string"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"x-events": []
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"/handleICE": {
|
|
66
|
+
"post": {
|
|
67
|
+
"tags": ["service"],
|
|
68
|
+
"summary": "Heygen ICE",
|
|
69
|
+
"parameters": [
|
|
70
|
+
{
|
|
71
|
+
"name": "serverUrl",
|
|
72
|
+
"summary": "URL",
|
|
73
|
+
"required": false,
|
|
74
|
+
"description": "Heygen server URL",
|
|
75
|
+
"schema": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "apiKey",
|
|
81
|
+
"summary": "Heygen API Key",
|
|
82
|
+
"required": false,
|
|
83
|
+
"description": "Heygen API Key",
|
|
84
|
+
"schema": {
|
|
85
|
+
"type": "string"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "sessionId",
|
|
90
|
+
"summary": "Session",
|
|
91
|
+
"required": false,
|
|
92
|
+
"description": "Session ID",
|
|
93
|
+
"schema": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "candidate",
|
|
99
|
+
"summary": "ICE Candidate",
|
|
100
|
+
"required": false,
|
|
101
|
+
"description": "ICE Candidate",
|
|
102
|
+
"schema": {
|
|
103
|
+
"type": "object"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"x-events": []
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"/startSession": {
|
|
111
|
+
"post": {
|
|
112
|
+
"tags": ["service"],
|
|
113
|
+
"summary": "Start Heygen session",
|
|
114
|
+
"parameters": [
|
|
115
|
+
{
|
|
116
|
+
"name": "serverUrl",
|
|
117
|
+
"summary": "URL",
|
|
118
|
+
"required": false,
|
|
119
|
+
"description": "Heygen server URL",
|
|
120
|
+
"schema": {
|
|
121
|
+
"type": "string"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "apiKey",
|
|
126
|
+
"summary": "Heygen API Key",
|
|
127
|
+
"required": false,
|
|
128
|
+
"description": "Heygen API Key",
|
|
129
|
+
"schema": {
|
|
130
|
+
"type": "string"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "sessionId",
|
|
135
|
+
"summary": "Session",
|
|
136
|
+
"required": false,
|
|
137
|
+
"description": "Session ID",
|
|
138
|
+
"schema": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "sdp",
|
|
144
|
+
"summary": "SDP",
|
|
145
|
+
"required": false,
|
|
146
|
+
"description": "SDP",
|
|
147
|
+
"schema": {
|
|
148
|
+
"type": "object"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
"x-events": []
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"/talk": {
|
|
156
|
+
"post": {
|
|
157
|
+
"tags": ["service"],
|
|
158
|
+
"summary": "Talk with Heygen",
|
|
159
|
+
"parameters": [
|
|
160
|
+
{
|
|
161
|
+
"name": "serverUrl",
|
|
162
|
+
"summary": "URL",
|
|
163
|
+
"required": false,
|
|
164
|
+
"description": "Heygen server URL",
|
|
165
|
+
"schema": {
|
|
166
|
+
"type": "string"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "apiKey",
|
|
171
|
+
"summary": "Heygen API Key",
|
|
172
|
+
"required": false,
|
|
173
|
+
"description": "Heygen API Key",
|
|
174
|
+
"schema": {
|
|
175
|
+
"type": "string"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "sessionId",
|
|
180
|
+
"summary": "Session",
|
|
181
|
+
"required": false,
|
|
182
|
+
"description": "Session ID",
|
|
183
|
+
"schema": {
|
|
184
|
+
"type": "string"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "text",
|
|
189
|
+
"summary": "Text",
|
|
190
|
+
"required": false,
|
|
191
|
+
"description": "Text to say",
|
|
192
|
+
"schema": {
|
|
193
|
+
"type": "string"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"x-events": []
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"/stop": {
|
|
201
|
+
"post": {
|
|
202
|
+
"tags": ["service"],
|
|
203
|
+
"summary": "Stop Heygen session",
|
|
204
|
+
"parameters": [
|
|
205
|
+
{
|
|
206
|
+
"name": "serverUrl",
|
|
207
|
+
"summary": "URL",
|
|
208
|
+
"required": false,
|
|
209
|
+
"description": "Heygen server URL",
|
|
210
|
+
"schema": {
|
|
211
|
+
"type": "string"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"name": "apiKey",
|
|
216
|
+
"summary": "Heygen API Key",
|
|
217
|
+
"required": false,
|
|
218
|
+
"description": "Heygen API Key",
|
|
219
|
+
"schema": {
|
|
220
|
+
"type": "string"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"name": "sessionId",
|
|
225
|
+
"summary": "Session",
|
|
226
|
+
"required": false,
|
|
227
|
+
"description": "Session ID",
|
|
228
|
+
"schema": {
|
|
229
|
+
"type": "string"
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"x-events": []
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"components": {
|
|
238
|
+
"schemas": {}
|
|
239
|
+
},
|
|
240
|
+
"x-scene-blocks": {}
|
|
241
|
+
}
|