@sogni-ai/sogni-protocol 1.0.0-alpha.32 → 1.0.0-alpha.33
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.
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"generate_image": "../schemas/tools/generate_image.schema.json",
|
|
6
6
|
"generate_video": "../schemas/tools/generate_video.schema.json",
|
|
7
7
|
"generate_music": "../schemas/tools/generate_music.schema.json",
|
|
8
|
+
"generate_speech": "../schemas/tools/generate_speech.schema.json",
|
|
8
9
|
"edit_image": "../schemas/tools/edit_image.schema.json",
|
|
9
10
|
"apply_style": "../schemas/tools/apply_style.schema.json",
|
|
10
11
|
"restore_photo": "../schemas/tools/restore_photo.schema.json",
|
|
@@ -370,6 +371,88 @@
|
|
|
370
371
|
}
|
|
371
372
|
}
|
|
372
373
|
},
|
|
374
|
+
{
|
|
375
|
+
"type": "function",
|
|
376
|
+
"function": {
|
|
377
|
+
"name": "generate_speech",
|
|
378
|
+
"description": "Turn written words into spoken audio. Use when the user wants something read aloud, a narration, a voiceover, a line of dialogue, an audiobook passage, or a voice cloned from a recording they uploaded. This tool speaks text; it does not compose music — use generate_music for songs and instrumentals.",
|
|
379
|
+
"parameters": {
|
|
380
|
+
"type": "object",
|
|
381
|
+
"properties": {
|
|
382
|
+
"prompt": {
|
|
383
|
+
"type": "string",
|
|
384
|
+
"description": "The exact words to be spoken, verbatim. This is NOT a description of the audio: whatever is written here is read aloud character for character. \"a calm woman reading the news\" would be spoken as those seven words — put that in voiceDescription instead and write the actual news copy here.\n\nLITERAL PROMPT OVERRIDE: If the user explicitly says not to modify the prompt, or to use it exactly/verbatim/as-is, copy the identified prompt text verbatim instead of applying these construction rules unless a hard requirement is missing.\n\nPunctuation is prosody: full stops, commas, question marks and ellipses control pauses and intonation, so keep them. Write numbers, dates, currency and abbreviations the way they should be said (\"nineteen eighty-four\", \"twelve dollars fifty\", \"Doctor Chen\") when the plain form would be ambiguous. Line breaks are not pauses; use punctuation.\n\nLimit 4096 characters, roughly five minutes of speech. A longer script is refused rather than cut off mid-sentence, so split it across several calls at a natural break.",
|
|
385
|
+
"maxLength": 4096
|
|
386
|
+
},
|
|
387
|
+
"model": {
|
|
388
|
+
"type": "string",
|
|
389
|
+
"enum": [
|
|
390
|
+
"voice",
|
|
391
|
+
"clone",
|
|
392
|
+
"design"
|
|
393
|
+
],
|
|
394
|
+
"description": "Which speech model to use, chosen by what the user gave you. \"voice\" (default): one of nine studio voices, optionally restyled by voiceDescription — the right choice for narration, voiceover and dialogue when no particular person is being imitated. \"clone\": reproduces a specific voice from a recording the user uploaded; requires voiceSourceIndex. \"design\": invents a speaker who does not exist from a written description; requires voiceDescription and takes no recording. Pick \"clone\" whenever the user uploads a voice clip and asks for that person, and \"design\" when they describe a speaker instead of choosing one."
|
|
395
|
+
},
|
|
396
|
+
"voice": {
|
|
397
|
+
"type": "string",
|
|
398
|
+
"enum": [
|
|
399
|
+
"serena",
|
|
400
|
+
"vivian",
|
|
401
|
+
"uncle_fu",
|
|
402
|
+
"ryan",
|
|
403
|
+
"aiden",
|
|
404
|
+
"ono_anna",
|
|
405
|
+
"sohee",
|
|
406
|
+
"eric",
|
|
407
|
+
"dylan"
|
|
408
|
+
],
|
|
409
|
+
"description": "Studio voice to speak in. Only used when model=\"voice\". Female: serena (English), vivian (Chinese), ono_anna (Japanese), sohee (Korean). Male: ryan, aiden, eric, dylan (English), uncle_fu (older, Chinese). Every voice speaks all supported languages — the note above describes the accent it carries, not a limit on what it can read. Default: serena."
|
|
410
|
+
},
|
|
411
|
+
"voiceDescription": {
|
|
412
|
+
"type": "string",
|
|
413
|
+
"description": "How the line should be delivered, or who should deliver it. With model=\"voice\" this restyles the chosen voice without changing who it is: \"whispering, close to the microphone\", \"furious\", \"reading a bedtime story\", \"like a sports commentator\". With model=\"design\" this is required and describes a speaker to invent: age, gender, accent, timbre, pace, mood, and recording space — \"a warm, unhurried narrator in her forties with a faint Scottish lilt, close-miked in a quiet room\". Describe one coherent person; contradictory directions produce a voice that shifts mid-sentence. Not accepted with model=\"clone\", where the recording defines the voice. Limit 512 characters.",
|
|
414
|
+
"maxLength": 512
|
|
415
|
+
},
|
|
416
|
+
"voiceSourceIndex": {
|
|
417
|
+
"type": "number",
|
|
418
|
+
"description": "Index of the uploaded audio file holding the voice to clone (0-based, from the uploaded files list, the same numbering other tools use for audio). Required when model=\"clone\" and ignored otherwise. The clip should be three to thirty seconds of one person speaking cleanly, with no music, no second speaker and no heavy room echo; anything past thirty seconds is trimmed.",
|
|
419
|
+
"minimum": 0
|
|
420
|
+
},
|
|
421
|
+
"voiceTranscript": {
|
|
422
|
+
"type": "string",
|
|
423
|
+
"description": "The exact words spoken in the uploaded clip, when model=\"clone\". Supplying it lets the model condition on the recording itself rather than on a speaker fingerprint alone, which is markedly closer to the source — set it whenever the user tells you what the clip says or the transcript is otherwise known. Omitting it still produces a recognisable clone, just a looser one. Limit 1024 characters.",
|
|
424
|
+
"maxLength": 1024
|
|
425
|
+
},
|
|
426
|
+
"language": {
|
|
427
|
+
"type": "string",
|
|
428
|
+
"enum": [
|
|
429
|
+
"auto",
|
|
430
|
+
"english",
|
|
431
|
+
"chinese",
|
|
432
|
+
"japanese",
|
|
433
|
+
"korean",
|
|
434
|
+
"german",
|
|
435
|
+
"french",
|
|
436
|
+
"russian",
|
|
437
|
+
"portuguese",
|
|
438
|
+
"spanish",
|
|
439
|
+
"italian"
|
|
440
|
+
],
|
|
441
|
+
"description": "Language of the script. Default \"auto\", which infers it from the text and is the only setting that reads a code-switched line correctly. Pin a language only when auto mis-reads a name, a loanword, or a passage that is ambiguous between two of them. Cloning is cross-lingual: an English reference clip can read Japanese in the same voice."
|
|
442
|
+
},
|
|
443
|
+
"numberOfVariations": {
|
|
444
|
+
"type": "number",
|
|
445
|
+
"description": "Number of takes (1-16). Each take is a separate read of the same script with the same voice, differing only in delivery. Use more than 1 when the user asks for options or alternate reads. Default: 1.",
|
|
446
|
+
"minimum": 1,
|
|
447
|
+
"maximum": 16
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
"required": [
|
|
451
|
+
"prompt"
|
|
452
|
+
]
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
},
|
|
373
456
|
{
|
|
374
457
|
"type": "function",
|
|
375
458
|
"function": {
|
|
@@ -332,6 +332,88 @@
|
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
},
|
|
335
|
+
{
|
|
336
|
+
"type": "function",
|
|
337
|
+
"function": {
|
|
338
|
+
"name": "generate_speech",
|
|
339
|
+
"description": "Turn written words into spoken audio. Use when the user wants something read aloud, a narration, a voiceover, a line of dialogue, an audiobook passage, or a voice cloned from a recording they uploaded. This tool speaks text; it does not compose music — use generate_music for songs and instrumentals.",
|
|
340
|
+
"parameters": {
|
|
341
|
+
"type": "object",
|
|
342
|
+
"properties": {
|
|
343
|
+
"prompt": {
|
|
344
|
+
"type": "string",
|
|
345
|
+
"description": "The exact words to be spoken, verbatim. This is NOT a description of the audio: whatever is written here is read aloud character for character. \"a calm woman reading the news\" would be spoken as those seven words — put that in voiceDescription instead and write the actual news copy here.\n\nLITERAL PROMPT OVERRIDE: If the user explicitly says not to modify the prompt, or to use it exactly/verbatim/as-is, copy the identified prompt text verbatim instead of applying these construction rules unless a hard requirement is missing.\n\nPunctuation is prosody: full stops, commas, question marks and ellipses control pauses and intonation, so keep them. Write numbers, dates, currency and abbreviations the way they should be said (\"nineteen eighty-four\", \"twelve dollars fifty\", \"Doctor Chen\") when the plain form would be ambiguous. Line breaks are not pauses; use punctuation.\n\nLimit 4096 characters, roughly five minutes of speech. A longer script is refused rather than cut off mid-sentence, so split it across several calls at a natural break.",
|
|
346
|
+
"maxLength": 4096
|
|
347
|
+
},
|
|
348
|
+
"model": {
|
|
349
|
+
"type": "string",
|
|
350
|
+
"enum": [
|
|
351
|
+
"voice",
|
|
352
|
+
"clone",
|
|
353
|
+
"design"
|
|
354
|
+
],
|
|
355
|
+
"description": "Which speech model to use, chosen by what the user gave you. \"voice\" (default): one of nine studio voices, optionally restyled by voiceDescription — the right choice for narration, voiceover and dialogue when no particular person is being imitated. \"clone\": reproduces a specific voice from a recording the user uploaded; requires voiceSourceIndex. \"design\": invents a speaker who does not exist from a written description; requires voiceDescription and takes no recording. Pick \"clone\" whenever the user uploads a voice clip and asks for that person, and \"design\" when they describe a speaker instead of choosing one."
|
|
356
|
+
},
|
|
357
|
+
"voice": {
|
|
358
|
+
"type": "string",
|
|
359
|
+
"enum": [
|
|
360
|
+
"serena",
|
|
361
|
+
"vivian",
|
|
362
|
+
"uncle_fu",
|
|
363
|
+
"ryan",
|
|
364
|
+
"aiden",
|
|
365
|
+
"ono_anna",
|
|
366
|
+
"sohee",
|
|
367
|
+
"eric",
|
|
368
|
+
"dylan"
|
|
369
|
+
],
|
|
370
|
+
"description": "Studio voice to speak in. Only used when model=\"voice\". Female: serena (English), vivian (Chinese), ono_anna (Japanese), sohee (Korean). Male: ryan, aiden, eric, dylan (English), uncle_fu (older, Chinese). Every voice speaks all supported languages — the note above describes the accent it carries, not a limit on what it can read. Default: serena."
|
|
371
|
+
},
|
|
372
|
+
"voiceDescription": {
|
|
373
|
+
"type": "string",
|
|
374
|
+
"description": "How the line should be delivered, or who should deliver it. With model=\"voice\" this restyles the chosen voice without changing who it is: \"whispering, close to the microphone\", \"furious\", \"reading a bedtime story\", \"like a sports commentator\". With model=\"design\" this is required and describes a speaker to invent: age, gender, accent, timbre, pace, mood, and recording space — \"a warm, unhurried narrator in her forties with a faint Scottish lilt, close-miked in a quiet room\". Describe one coherent person; contradictory directions produce a voice that shifts mid-sentence. Not accepted with model=\"clone\", where the recording defines the voice. Limit 512 characters.",
|
|
375
|
+
"maxLength": 512
|
|
376
|
+
},
|
|
377
|
+
"voiceSourceIndex": {
|
|
378
|
+
"type": "number",
|
|
379
|
+
"description": "Index of the uploaded audio file holding the voice to clone (0-based, from the uploaded files list, the same numbering other tools use for audio). Required when model=\"clone\" and ignored otherwise. The clip should be three to thirty seconds of one person speaking cleanly, with no music, no second speaker and no heavy room echo; anything past thirty seconds is trimmed.",
|
|
380
|
+
"minimum": 0
|
|
381
|
+
},
|
|
382
|
+
"voiceTranscript": {
|
|
383
|
+
"type": "string",
|
|
384
|
+
"description": "The exact words spoken in the uploaded clip, when model=\"clone\". Supplying it lets the model condition on the recording itself rather than on a speaker fingerprint alone, which is markedly closer to the source — set it whenever the user tells you what the clip says or the transcript is otherwise known. Omitting it still produces a recognisable clone, just a looser one. Limit 1024 characters.",
|
|
385
|
+
"maxLength": 1024
|
|
386
|
+
},
|
|
387
|
+
"language": {
|
|
388
|
+
"type": "string",
|
|
389
|
+
"enum": [
|
|
390
|
+
"auto",
|
|
391
|
+
"english",
|
|
392
|
+
"chinese",
|
|
393
|
+
"japanese",
|
|
394
|
+
"korean",
|
|
395
|
+
"german",
|
|
396
|
+
"french",
|
|
397
|
+
"russian",
|
|
398
|
+
"portuguese",
|
|
399
|
+
"spanish",
|
|
400
|
+
"italian"
|
|
401
|
+
],
|
|
402
|
+
"description": "Language of the script. Default \"auto\", which infers it from the text and is the only setting that reads a code-switched line correctly. Pin a language only when auto mis-reads a name, a loanword, or a passage that is ambiguous between two of them. Cloning is cross-lingual: an English reference clip can read Japanese in the same voice."
|
|
403
|
+
},
|
|
404
|
+
"numberOfVariations": {
|
|
405
|
+
"type": "number",
|
|
406
|
+
"description": "Number of takes (1-16). Each take is a separate read of the same script with the same voice, differing only in delivery. Use more than 1 when the user asks for options or alternate reads. Default: 1.",
|
|
407
|
+
"minimum": 1,
|
|
408
|
+
"maximum": 16
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
"required": [
|
|
412
|
+
"prompt"
|
|
413
|
+
]
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
},
|
|
335
417
|
{
|
|
336
418
|
"type": "function",
|
|
337
419
|
"function": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sogni-ai/sogni-protocol",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.33",
|
|
4
4
|
"description": "Language-neutral protocol artifacts for the Sogni ecosystem: tool schemas, prompts, OpenAI tool manifests, and enums. Consumed by every Sogni SDK (TypeScript, Swift, and future Python/Kotlin/Rust SDKs) so contracts stay in lockstep across languages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sogni",
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sogni.ai/creative-agent/2026-09-07.1/tools/generate_speech.schema.json",
|
|
4
|
+
"title": "generate_speech arguments",
|
|
5
|
+
"schemaVersion": "2026-09-07.1",
|
|
6
|
+
"description": "Turn written words into spoken audio. Use when the user wants something read aloud, a narration, a voiceover, a line of dialogue, an audiobook passage, or a voice cloned from a recording they uploaded. This tool speaks text; it does not compose music — use generate_music for songs and instrumentals.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"prompt": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "The exact words to be spoken, verbatim. This is NOT a description of the audio: whatever is written here is read aloud character for character. \"a calm woman reading the news\" would be spoken as those seven words — put that in voiceDescription instead and write the actual news copy here.\n\nLITERAL PROMPT OVERRIDE: If the user explicitly says not to modify the prompt, or to use it exactly/verbatim/as-is, copy the identified prompt text verbatim instead of applying these construction rules unless a hard requirement is missing.\n\nPunctuation is prosody: full stops, commas, question marks and ellipses control pauses and intonation, so keep them. Write numbers, dates, currency and abbreviations the way they should be said (\"nineteen eighty-four\", \"twelve dollars fifty\", \"Doctor Chen\") when the plain form would be ambiguous. Line breaks are not pauses; use punctuation.\n\nLimit 4096 characters, roughly five minutes of speech. A longer script is refused rather than cut off mid-sentence, so split it across several calls at a natural break.",
|
|
13
|
+
"maxLength": 4096
|
|
14
|
+
},
|
|
15
|
+
"model": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": [
|
|
18
|
+
"voice",
|
|
19
|
+
"clone",
|
|
20
|
+
"design"
|
|
21
|
+
],
|
|
22
|
+
"description": "Which speech model to use, chosen by what the user gave you. \"voice\" (default): one of nine studio voices, optionally restyled by voiceDescription — the right choice for narration, voiceover and dialogue when no particular person is being imitated. \"clone\": reproduces a specific voice from a recording the user uploaded; requires voiceSourceIndex. \"design\": invents a speaker who does not exist from a written description; requires voiceDescription and takes no recording. Pick \"clone\" whenever the user uploads a voice clip and asks for that person, and \"design\" when they describe a speaker instead of choosing one."
|
|
23
|
+
},
|
|
24
|
+
"voice": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"enum": [
|
|
27
|
+
"serena",
|
|
28
|
+
"vivian",
|
|
29
|
+
"uncle_fu",
|
|
30
|
+
"ryan",
|
|
31
|
+
"aiden",
|
|
32
|
+
"ono_anna",
|
|
33
|
+
"sohee",
|
|
34
|
+
"eric",
|
|
35
|
+
"dylan"
|
|
36
|
+
],
|
|
37
|
+
"description": "Studio voice to speak in. Only used when model=\"voice\". Female: serena (English), vivian (Chinese), ono_anna (Japanese), sohee (Korean). Male: ryan, aiden, eric, dylan (English), uncle_fu (older, Chinese). Every voice speaks all supported languages — the note above describes the accent it carries, not a limit on what it can read. Default: serena."
|
|
38
|
+
},
|
|
39
|
+
"voiceDescription": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "How the line should be delivered, or who should deliver it. With model=\"voice\" this restyles the chosen voice without changing who it is: \"whispering, close to the microphone\", \"furious\", \"reading a bedtime story\", \"like a sports commentator\". With model=\"design\" this is required and describes a speaker to invent: age, gender, accent, timbre, pace, mood, and recording space — \"a warm, unhurried narrator in her forties with a faint Scottish lilt, close-miked in a quiet room\". Describe one coherent person; contradictory directions produce a voice that shifts mid-sentence. Not accepted with model=\"clone\", where the recording defines the voice. Limit 512 characters.",
|
|
42
|
+
"maxLength": 512
|
|
43
|
+
},
|
|
44
|
+
"voiceSourceIndex": {
|
|
45
|
+
"type": "number",
|
|
46
|
+
"description": "Index of the uploaded audio file holding the voice to clone (0-based, from the uploaded files list, the same numbering other tools use for audio). Required when model=\"clone\" and ignored otherwise. The clip should be three to thirty seconds of one person speaking cleanly, with no music, no second speaker and no heavy room echo; anything past thirty seconds is trimmed.",
|
|
47
|
+
"minimum": 0
|
|
48
|
+
},
|
|
49
|
+
"voiceTranscript": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"description": "The exact words spoken in the uploaded clip, when model=\"clone\". Supplying it lets the model condition on the recording itself rather than on a speaker fingerprint alone, which is markedly closer to the source — set it whenever the user tells you what the clip says or the transcript is otherwise known. Omitting it still produces a recognisable clone, just a looser one. Limit 1024 characters.",
|
|
52
|
+
"maxLength": 1024
|
|
53
|
+
},
|
|
54
|
+
"language": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"enum": [
|
|
57
|
+
"auto",
|
|
58
|
+
"english",
|
|
59
|
+
"chinese",
|
|
60
|
+
"japanese",
|
|
61
|
+
"korean",
|
|
62
|
+
"german",
|
|
63
|
+
"french",
|
|
64
|
+
"russian",
|
|
65
|
+
"portuguese",
|
|
66
|
+
"spanish",
|
|
67
|
+
"italian"
|
|
68
|
+
],
|
|
69
|
+
"description": "Language of the script. Default \"auto\", which infers it from the text and is the only setting that reads a code-switched line correctly. Pin a language only when auto mis-reads a name, a loanword, or a passage that is ambiguous between two of them. Cloning is cross-lingual: an English reference clip can read Japanese in the same voice."
|
|
70
|
+
},
|
|
71
|
+
"numberOfVariations": {
|
|
72
|
+
"type": "number",
|
|
73
|
+
"description": "Number of takes (1-16). Each take is a separate read of the same script with the same voice, differing only in delivery. Use more than 1 when the user asks for options or alternate reads. Default: 1.",
|
|
74
|
+
"minimum": 1,
|
|
75
|
+
"maximum": 16
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"required": [
|
|
79
|
+
"prompt"
|
|
80
|
+
]
|
|
81
|
+
}
|
package/version.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"protocolVersion": "4.
|
|
2
|
+
"protocolVersion": "4.3.0",
|
|
3
3
|
"description": "Sogni protocol artifact version. SDKs may refuse to operate against a protocolVersion they were not built for. Bump the major when removing or renaming any schema / enum / manifest field; bump the minor when adding new optional fields or new tools; bump the patch for description / prose changes only."
|
|
4
4
|
}
|