Update README.md
Browse filesFixed indentation
README.md
CHANGED
|
@@ -239,14 +239,11 @@ audio_url = AudioAsset("mary_had_lamb").url
|
|
| 239 |
# Use base64 encoded audio in the payload
|
| 240 |
def encode_audio_base64_from_url(audio_url: str) -> str:
|
| 241 |
"""Encode an audio retrieved from a remote url to base64 format."""
|
| 242 |
-
|
| 243 |
with requests.get(audio_url) as response:
|
| 244 |
response.raise_for_status()
|
| 245 |
result = base64.b64encode(response.content).decode('utf-8')
|
| 246 |
-
|
| 247 |
return result
|
| 248 |
|
| 249 |
-
|
| 250 |
audio_base64 = encode_audio_base64_from_url(audio_url=audio_url)
|
| 251 |
|
| 252 |
### 1. Example with Audio
|
|
|
|
| 239 |
# Use base64 encoded audio in the payload
|
| 240 |
def encode_audio_base64_from_url(audio_url: str) -> str:
|
| 241 |
"""Encode an audio retrieved from a remote url to base64 format."""
|
|
|
|
| 242 |
with requests.get(audio_url) as response:
|
| 243 |
response.raise_for_status()
|
| 244 |
result = base64.b64encode(response.content).decode('utf-8')
|
|
|
|
| 245 |
return result
|
| 246 |
|
|
|
|
| 247 |
audio_base64 = encode_audio_base64_from_url(audio_url=audio_url)
|
| 248 |
|
| 249 |
### 1. Example with Audio
|