Skip to content

Commit 325fe7d

Browse files
committed
Addressing comments
1 parent fefc834 commit 325fe7d

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_call_connection_client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -610,11 +610,12 @@ def start_recognizing_media(
610610
interrupt_prompt: bool = False,
611611
dtmf_inter_tone_timeout: Optional[int] = None,
612612
dtmf_max_tones_to_collect: Optional[int] = None,
613-
dtmf_stop_tones: Optional[List[Union[str, "DtmfTone"]]] = None,
613+
dtmf_stop_tones: Optional[List[Union[str, 'DtmfTone']]] = None,
614614
speech_language: Optional[str] = None,
615615
choices: Optional[List["RecognitionChoice"]] = None,
616616
end_silence_timeout: Optional[int] = None,
617617
speech_recognition_model_endpoint_id: Optional[str] = None,
618+
operation_callback_url: Optional[str] = None,
618619
**kwargs,
619620
) -> None:
620621
"""Recognize inputs from specific participant in this call.
@@ -952,16 +953,16 @@ def stop_transcription(
952953
@distributed_trace
953954
def update_transcription(
954955
self,
955-
locale: str,
956956
*,
957+
locale: str,
957958
operation_context: Optional[str] = None,
958959
speech_recognition_model_endpoint_id: Optional[str] = None,
959960
operation_callback_url: Optional[str] = None,
960961
**kwargs) -> None:
961962
"""API to change transcription language.
962963
963-
:param locale: Defines new locale for transcription.
964-
:type locale: str
964+
:keyword locale: Defines new locale for transcription.
965+
:paramtype locale: str
965966
:keyword operation_context: The value to identify context of the operation.
966967
:paramtype operation_context: str
967968
:keyword speech_recognition_model_endpoint_id: Endpoint where the custom model was deployed.

sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_credential/call_automation_policy.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ def __init__(
3030
acs_url: str,
3131
access_key: Union[str, AzureKeyCredential],
3232
decode_url: bool = False,
33-
):
34-
# type: (...) -> None
33+
) -> None:
3534
super(CallAutomationHMACCredentialsPolicy, self).__init__()
3635

3736
if host.startswith("https://"):

sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_models.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ class MediaStreamingOptions:
391391

392392
def __init__(
393393
self,
394+
*
394395
transport_url: str,
395396
transport_type: Union[str, 'StreamingTransportType'],
396397
content_type: Union[str, 'MediaStreamingContentType'],
@@ -407,7 +408,7 @@ def __init__(
407408
self.enable_bidirectional = enable_bidirectional
408409
self.audio_format = audio_format
409410

410-
def to_generated(self):
411+
def _to_generated(self):
411412
return WebSocketMediaStreamingOptionsRest(
412413
transport_url=self.transport_url,
413414
transport_type=self.transport_type,
@@ -452,6 +453,7 @@ class TranscriptionOptions:
452453

453454
def __init__(
454455
self,
456+
*,
455457
transport_url: str,
456458
transport_type: Union[str, "StreamingTransportType"],
457459
locale: str,
@@ -466,7 +468,7 @@ def __init__(
466468
self.speech_recognition_model_endpoint_id = speech_recognition_model_endpoint_id
467469
self.enable_intermediate_results = enable_intermediate_results
468470

469-
def to_generated(self):
471+
def _to_generated(self):
470472
return WebSocketTranscriptionOptionsRest(
471473
transport_url=self.transport_url,
472474
transport_type=self.transport_type,

sdk/communication/azure-communication-callautomation/azure/communication/callautomation/aio/_call_connection_client_async.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ async def start_recognizing_media(
631631
interrupt_prompt: bool = False,
632632
dtmf_inter_tone_timeout: Optional[int] = None,
633633
dtmf_max_tones_to_collect: Optional[int] = None,
634-
dtmf_stop_tones: Optional[List[str or "DtmfTone"]] = None,
634+
dtmf_stop_tones: Optional[List[Union[str, 'DtmfTone']]] = None,
635635
speech_language: Optional[str] = None,
636636
choices: Optional[List["RecognitionChoice"]] = None,
637637
end_silence_timeout: Optional[int] = None,
@@ -978,15 +978,16 @@ async def stop_transcription(
978978
@distributed_trace_async
979979
async def update_transcription(
980980
self,
981-
locale: str,
982981
*,
982+
locale: str,
983983
operation_context: Optional[str] = None,
984984
speech_recognition_model_endpoint_id: Optional[str] = None,
985985
operation_callback_url: Optional[str] = None,
986986
**kwargs) -> None:
987987
"""API to change transcription language.
988988
989-
:param locale: Defines new locale for transcription.
989+
:keyword locale: Defines new locale for transcription.
990+
:paramtype locale: str
990991
:keyword operation_context: The value to identify context of the operation.
991992
:paramtype operation_context: str
992993
:keyword speech_recognition_model_endpoint_id: Endpoint where the custom model was deployed.
@@ -1107,7 +1108,7 @@ async def start_media_streaming(
11071108
operation_callback_uri=operation_callback_url,
11081109
operation_context=operation_context
11091110
)
1110-
self._call_media_client.start_media_streaming(
1111+
await self._call_media_client.start_media_streaming(
11111112
self._call_connection_id,
11121113
start_media_streaming_request,
11131114
**kwargs)
@@ -1137,7 +1138,7 @@ async def stop_media_streaming(
11371138
operation_callback_uri=operation_callback_url,
11381139
operation_context=operation_context
11391140
)
1140-
self._call_media_client.stop_media_streaming(
1141+
await self._call_media_client.stop_media_streaming(
11411142
self._call_connection_id,
11421143
stop_media_streaming_request,
11431144
**kwargs

0 commit comments

Comments
 (0)