Skip to content

Commit 4db9c95

Browse files
Releasing version 3.48.0
Releasing version 3.48.0
2 parents 6ef9f74 + f5533b2 commit 4db9c95

File tree

12 files changed

+990
-65
lines changed

12 files changed

+990
-65
lines changed

CHANGELOG.rst

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,49 @@ All notable changes to this project will be documented in this file.
66

77
The format is based on `Keep a Changelog <http://keepachangelog.com/>`__.
88

9+
3.48.0 - 2024-09-17
10+
--------------------
11+
Added
12+
~~~~~
13+
* Support Dedicated AI Cluster Unit Shape LARGE_GENERIC_4 in the Generative AI Service Management
14+
15+
* ``oci generative-ai dedicated-ai-cluster``
16+
17+
* Support for allowing the operator to provide a ticket number when creating access request in the Lockbox service
18+
19+
* ``oci oma access-request create --ticket-number``
20+
21+
* Support for release 3.1 of Capacity Management Service
22+
23+
* ``oci capacity-management occ-handover-resource-block-collection``
24+
* ``oci capacity-management occ-customer``
25+
* ``oci capacity-management occ-customer-group``
26+
27+
* Support for Text to Speech in Speech service
28+
29+
* ``oci speech synthesize-speech``
30+
* ``oci speech voice list``
31+
32+
* Fleet Software Update service
33+
34+
* Support to create DB and GI Collections major version 23.
35+
36+
* ``oci fleet-software-update fsu-collection create-db --source-major-version DB_23``
37+
* ``oci fleet-software-update fsu-collection create-gi --source-major-version GI_23``
38+
39+
* Support to create DB and GI Collections major version 23.
40+
41+
* ``oci fleet-software-update fsu-cycle create-patch --goal-version-details { "version" : "23.4.0.0" }``
42+
43+
Changed
44+
~~~~~~~
45+
* Capacity Management Service
46+
47+
* [BREAKING] Optional parameter ``--occ-customer-group-id`` has now been made required in the following commands
48+
49+
* ``oci capacity-management occ-overview-collection list-internal-namespace-occ-overviews``
50+
* ``oci capacity-management occ-availability-catalog-collection list-internal``
51+
952
3.47.0 - 2024-08-27
1053
--------------------
1154

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Jinja2>=3.1.4; python_version >= '3.7'
1515
jmespath==0.10.0
1616
ndg-httpsclient==0.4.2
1717
mock==2.0.0
18-
oci==2.133.0
18+
oci==2.134.0
1919
packaging==20.2
2020
pluggy==0.13.0
2121
py==1.11.0

services/ai_speech/src/oci_cli_ai_service_speech/aiservicespeech_cli_extended.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,16 @@
77

88
aiservicespeech_cli.transcription_job_group.commands.pop(aiservicespeech_cli.create_transcription_job_object_list_file_input_location.name)
99
aiservicespeech_cli.transcription_job_group.commands.pop(aiservicespeech_cli.create_transcription_job_object_list_inline_input_location.name)
10+
11+
12+
# Remove synthesize-speech-tts-base-audio-config from oci speech synthesize-speech
13+
aiservicespeech_cli.synthesize_speech_group.commands.pop(aiservicespeech_cli.synthesize_speech_tts_base_audio_config.name)
14+
15+
16+
# Remove synthesize-speech-tts-oracle-configuration from oci speech synthesize-speech
17+
aiservicespeech_cli.synthesize_speech_group.commands.pop(aiservicespeech_cli.synthesize_speech_tts_oracle_configuration.name)
18+
19+
20+
# Move oci speech synthesize-speech synthesize-speech -> oci speech synthesize-speech
21+
aiservicespeech_cli.synthesize_speech_group.commands.pop(aiservicespeech_cli.synthesize_speech.name)
22+
aiservicespeech_cli.speech_root_group.add_command(aiservicespeech_cli.synthesize_speech)

services/ai_speech/src/oci_cli_ai_service_speech/generated/aiservicespeech_cli.py

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,24 @@ def transcription_job_group():
4646
pass
4747

4848

49+
@click.command(cli_util.override('speech.voice_group.command_name', 'voice'), cls=CommandGroupWithAlias, help="""""")
50+
@cli_util.help_option_group
51+
def voice_group():
52+
pass
53+
54+
55+
@click.command(cli_util.override('speech.synthesize_speech_group.command_name', 'synthesize-speech'), cls=CommandGroupWithAlias, help="""""")
56+
@cli_util.help_option_group
57+
def synthesize_speech_group():
58+
pass
59+
60+
4961
speech_root_group.add_command(customization_group)
5062
speech_root_group.add_command(realtime_session_token_group)
5163
speech_root_group.add_command(transcription_task_group)
5264
speech_root_group.add_command(transcription_job_group)
65+
speech_root_group.add_command(voice_group)
66+
speech_root_group.add_command(synthesize_speech_group)
5367

5468

5569
@transcription_job_group.command(name=cli_util.override('speech.cancel_transcription_job.command_name', 'cancel'), help=u"""Canceling the job cancels all the tasks under it. \n[Command Reference](cancelTranscriptionJob)""")
@@ -1075,6 +1089,227 @@ def list_transcription_tasks(ctx, from_json, all_pages, page_size, transcription
10751089
cli_util.render_response(result, ctx)
10761090

10771091

1092+
@voice_group.command(name=cli_util.override('speech.list_voices.command_name', 'list'), help=u"""Returns a list of speakers available to the user to choose from based on language code and voice type provided. \n[Command Reference](listVoices)""")
1093+
@cli_util.option('--compartment-id', help=u"""The ID of the compartment in which to list resources.""")
1094+
@cli_util.option('--model-name', type=custom_types.CliCaseInsensitiveChoice(["TTS_1_STANDARD", "TTS_2_NATURAL"]), help=u"""The model the user wants to run the inference on.""")
1095+
@cli_util.option('--display-name', help=u"""The name of the speaker voice in which the user wants tts inference to be.""")
1096+
@cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results.""")
1097+
@json_skeleton_utils.get_cli_json_input_option({})
1098+
@cli_util.help_option
1099+
@click.pass_context
1100+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ai_speech', 'class': 'VoiceCollection'})
1101+
@cli_util.wrap_exceptions
1102+
def list_voices(ctx, from_json, all_pages, compartment_id, model_name, display_name):
1103+
1104+
kwargs = {}
1105+
if compartment_id is not None:
1106+
kwargs['compartment_id'] = compartment_id
1107+
if model_name is not None:
1108+
kwargs['model_name'] = model_name
1109+
if display_name is not None:
1110+
kwargs['display_name'] = display_name
1111+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1112+
client = cli_util.build_client('ai_speech', 'ai_service_speech', ctx)
1113+
result = client.list_voices(
1114+
**kwargs
1115+
)
1116+
cli_util.render_response(result, ctx)
1117+
1118+
1119+
@synthesize_speech_group.command(name=cli_util.override('speech.synthesize_speech.command_name', 'synthesize-speech'), help=u"""Creates an audio for the given input text based on other input parameters like language, voice type, etc. \n[Command Reference](synthesizeSpeech)""")
1120+
@cli_util.option('--text', required=True, help=u"""The text input to get the inference audio from TTS Service.""")
1121+
@cli_util.option('--file', type=click.File(mode='wb'), required=True, help="The name of the file that will receive the response data, or '-' to write to STDOUT.")
1122+
@cli_util.option('--is-stream-enabled', type=click.BOOL, help=u"""If set to true, response will be sent in the chunked transfer-encoding and audio chunks are sent back as and when they are ready. If set to false, response will be sent only once the entire audio is generated.""")
1123+
@cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment where the user has access to call `SpeechSynthesize` api. But default user access will be checked at tenancy level.""")
1124+
@cli_util.option('--configuration', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1125+
@cli_util.option('--audio-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1126+
@json_skeleton_utils.get_cli_json_input_option({'configuration': {'module': 'ai_speech', 'class': 'TtsConfiguration'}, 'audio-config': {'module': 'ai_speech', 'class': 'TtsAudioConfig'}})
1127+
@cli_util.help_option
1128+
@click.pass_context
1129+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'configuration': {'module': 'ai_speech', 'class': 'TtsConfiguration'}, 'audio-config': {'module': 'ai_speech', 'class': 'TtsAudioConfig'}})
1130+
@cli_util.wrap_exceptions
1131+
def synthesize_speech(ctx, from_json, file, text, is_stream_enabled, compartment_id, configuration, audio_config):
1132+
1133+
kwargs = {}
1134+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1135+
1136+
_details = {}
1137+
_details['text'] = text
1138+
1139+
if is_stream_enabled is not None:
1140+
_details['isStreamEnabled'] = is_stream_enabled
1141+
1142+
if compartment_id is not None:
1143+
_details['compartmentId'] = compartment_id
1144+
1145+
if configuration is not None:
1146+
_details['configuration'] = cli_util.parse_json_parameter("configuration", configuration)
1147+
1148+
if audio_config is not None:
1149+
_details['audioConfig'] = cli_util.parse_json_parameter("audio_config", audio_config)
1150+
1151+
client = cli_util.build_client('ai_speech', 'ai_service_speech', ctx)
1152+
result = client.synthesize_speech(
1153+
synthesize_speech_details=_details,
1154+
**kwargs
1155+
)
1156+
1157+
# If outputting to stdout we don't want to print a progress bar because it will get mixed up with the output
1158+
# Also we need a non-zero Content-Length in order to display a meaningful progress bar
1159+
bar = None
1160+
if hasattr(file, 'name') and file.name != '<stdout>' and 'Content-Length' in result.headers:
1161+
content_length = int(result.headers['Content-Length'])
1162+
if content_length > 0:
1163+
bar = click.progressbar(length=content_length, label='Downloading file')
1164+
1165+
try:
1166+
if bar:
1167+
bar.__enter__()
1168+
1169+
# TODO: Make the download size a configurable option
1170+
# use decode_content=True to automatically unzip service responses (this should be overridden for object storage)
1171+
for chunk in result.data.raw.stream(cli_constants.MEBIBYTE, decode_content=True):
1172+
if bar:
1173+
bar.update(len(chunk))
1174+
file.write(chunk)
1175+
finally:
1176+
if bar:
1177+
bar.render_finish()
1178+
file.close()
1179+
1180+
1181+
@synthesize_speech_group.command(name=cli_util.override('speech.synthesize_speech_tts_oracle_configuration.command_name', 'synthesize-speech-tts-oracle-configuration'), help=u"""Creates an audio for the given input text based on other input parameters like language, voice type, etc. \n[Command Reference](synthesizeSpeech)""")
1182+
@cli_util.option('--text', required=True, help=u"""The text input to get the inference audio from TTS Service.""")
1183+
@cli_util.option('--file', type=click.File(mode='wb'), required=True, help="The name of the file that will receive the response data, or '-' to write to STDOUT.")
1184+
@cli_util.option('--is-stream-enabled', type=click.BOOL, help=u"""If set to true, response will be sent in the chunked transfer-encoding and audio chunks are sent back as and when they are ready. If set to false, response will be sent only once the entire audio is generated.""")
1185+
@cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment where the user has access to call `SpeechSynthesize` api. But default user access will be checked at tenancy level.""")
1186+
@cli_util.option('--audio-config', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1187+
@cli_util.option('--configuration-model-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1188+
@cli_util.option('--configuration-speech-settings', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1189+
@json_skeleton_utils.get_cli_json_input_option({'audio-config': {'module': 'ai_speech', 'class': 'TtsAudioConfig'}, 'configuration-model-details': {'module': 'ai_speech', 'class': 'TtsOracleModelDetails'}, 'configuration-speech-settings': {'module': 'ai_speech', 'class': 'TtsOracleSpeechSettings'}})
1190+
@cli_util.help_option
1191+
@click.pass_context
1192+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'audio-config': {'module': 'ai_speech', 'class': 'TtsAudioConfig'}, 'configuration-model-details': {'module': 'ai_speech', 'class': 'TtsOracleModelDetails'}, 'configuration-speech-settings': {'module': 'ai_speech', 'class': 'TtsOracleSpeechSettings'}})
1193+
@cli_util.wrap_exceptions
1194+
def synthesize_speech_tts_oracle_configuration(ctx, from_json, file, text, is_stream_enabled, compartment_id, audio_config, configuration_model_details, configuration_speech_settings):
1195+
1196+
kwargs = {}
1197+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1198+
1199+
_details = {}
1200+
_details['configuration'] = {}
1201+
_details['text'] = text
1202+
1203+
if is_stream_enabled is not None:
1204+
_details['isStreamEnabled'] = is_stream_enabled
1205+
1206+
if compartment_id is not None:
1207+
_details['compartmentId'] = compartment_id
1208+
1209+
if audio_config is not None:
1210+
_details['audioConfig'] = cli_util.parse_json_parameter("audio_config", audio_config)
1211+
1212+
if configuration_model_details is not None:
1213+
_details['configuration']['modelDetails'] = cli_util.parse_json_parameter("configuration_model_details", configuration_model_details)
1214+
1215+
if configuration_speech_settings is not None:
1216+
_details['configuration']['speechSettings'] = cli_util.parse_json_parameter("configuration_speech_settings", configuration_speech_settings)
1217+
1218+
_details['configuration']['modelFamily'] = 'ORACLE'
1219+
1220+
client = cli_util.build_client('ai_speech', 'ai_service_speech', ctx)
1221+
result = client.synthesize_speech(
1222+
synthesize_speech_details=_details,
1223+
**kwargs
1224+
)
1225+
1226+
# If outputting to stdout we don't want to print a progress bar because it will get mixed up with the output
1227+
# Also we need a non-zero Content-Length in order to display a meaningful progress bar
1228+
bar = None
1229+
if hasattr(file, 'name') and file.name != '<stdout>' and 'Content-Length' in result.headers:
1230+
content_length = int(result.headers['Content-Length'])
1231+
if content_length > 0:
1232+
bar = click.progressbar(length=content_length, label='Downloading file')
1233+
1234+
try:
1235+
if bar:
1236+
bar.__enter__()
1237+
1238+
# TODO: Make the download size a configurable option
1239+
# use decode_content=True to automatically unzip service responses (this should be overridden for object storage)
1240+
for chunk in result.data.raw.stream(cli_constants.MEBIBYTE, decode_content=True):
1241+
if bar:
1242+
bar.update(len(chunk))
1243+
file.write(chunk)
1244+
finally:
1245+
if bar:
1246+
bar.render_finish()
1247+
file.close()
1248+
1249+
1250+
@synthesize_speech_group.command(name=cli_util.override('speech.synthesize_speech_tts_base_audio_config.command_name', 'synthesize-speech-tts-base-audio-config'), help=u"""Creates an audio for the given input text based on other input parameters like language, voice type, etc. \n[Command Reference](synthesizeSpeech)""")
1251+
@cli_util.option('--text', required=True, help=u"""The text input to get the inference audio from TTS Service.""")
1252+
@cli_util.option('--audio-config-save-path', required=True, help=u"""Specify the path where you want to save the audio response.""")
1253+
@cli_util.option('--file', type=click.File(mode='wb'), required=True, help="The name of the file that will receive the response data, or '-' to write to STDOUT.")
1254+
@cli_util.option('--is-stream-enabled', type=click.BOOL, help=u"""If set to true, response will be sent in the chunked transfer-encoding and audio chunks are sent back as and when they are ready. If set to false, response will be sent only once the entire audio is generated.""")
1255+
@cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment where the user has access to call `SpeechSynthesize` api. But default user access will be checked at tenancy level.""")
1256+
@cli_util.option('--configuration', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1257+
@json_skeleton_utils.get_cli_json_input_option({'configuration': {'module': 'ai_speech', 'class': 'TtsConfiguration'}})
1258+
@cli_util.help_option
1259+
@click.pass_context
1260+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'configuration': {'module': 'ai_speech', 'class': 'TtsConfiguration'}})
1261+
@cli_util.wrap_exceptions
1262+
def synthesize_speech_tts_base_audio_config(ctx, from_json, file, text, audio_config_save_path, is_stream_enabled, compartment_id, configuration):
1263+
1264+
kwargs = {}
1265+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1266+
1267+
_details = {}
1268+
_details['audioConfig'] = {}
1269+
_details['text'] = text
1270+
_details['audioConfig']['savePath'] = audio_config_save_path
1271+
1272+
if is_stream_enabled is not None:
1273+
_details['isStreamEnabled'] = is_stream_enabled
1274+
1275+
if compartment_id is not None:
1276+
_details['compartmentId'] = compartment_id
1277+
1278+
if configuration is not None:
1279+
_details['configuration'] = cli_util.parse_json_parameter("configuration", configuration)
1280+
1281+
_details['audioConfig']['configType'] = 'BASE_AUDIO_CONFIG'
1282+
1283+
client = cli_util.build_client('ai_speech', 'ai_service_speech', ctx)
1284+
result = client.synthesize_speech(
1285+
synthesize_speech_details=_details,
1286+
**kwargs
1287+
)
1288+
1289+
# If outputting to stdout we don't want to print a progress bar because it will get mixed up with the output
1290+
# Also we need a non-zero Content-Length in order to display a meaningful progress bar
1291+
bar = None
1292+
if hasattr(file, 'name') and file.name != '<stdout>' and 'Content-Length' in result.headers:
1293+
content_length = int(result.headers['Content-Length'])
1294+
if content_length > 0:
1295+
bar = click.progressbar(length=content_length, label='Downloading file')
1296+
1297+
try:
1298+
if bar:
1299+
bar.__enter__()
1300+
1301+
# TODO: Make the download size a configurable option
1302+
# use decode_content=True to automatically unzip service responses (this should be overridden for object storage)
1303+
for chunk in result.data.raw.stream(cli_constants.MEBIBYTE, decode_content=True):
1304+
if bar:
1305+
bar.update(len(chunk))
1306+
file.write(chunk)
1307+
finally:
1308+
if bar:
1309+
bar.render_finish()
1310+
file.close()
1311+
1312+
10781313
@customization_group.command(name=cli_util.override('speech.update_customization.command_name', 'update'), help=u"""Updates a Customization by identifier \n[Command Reference](updateCustomization)""")
10791314
@cli_util.option('--customization-id', required=True, help=u"""Unique Customization training Job identifier.""")
10801315
@cli_util.option('--alias', help=u"""Customization Details Alias""")

services/ai_speech/tests/util/generated/command_to_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
"speech.list_customizations": "oci.ai_speech.AIServiceSpeechClient.list_customizations",
1818
"speech.list_transcription_jobs": "oci.ai_speech.AIServiceSpeechClient.list_transcription_jobs",
1919
"speech.list_transcription_tasks": "oci.ai_speech.AIServiceSpeechClient.list_transcription_tasks",
20+
"speech.list_voices": "oci.ai_speech.AIServiceSpeechClient.list_voices",
21+
"speech.synthesize_speech": "oci.ai_speech.AIServiceSpeechClient.synthesize_speech",
2022
"speech.update_customization": "oci.ai_speech.AIServiceSpeechClient.update_customization",
2123
"speech.update_transcription_job": "oci.ai_speech.AIServiceSpeechClient.update_transcription_job",
2224
}

0 commit comments

Comments
 (0)