|
|
|
@ -279,7 +279,7 @@
|
|
|
|
|
"metadata": {}, |
|
|
|
|
"outputs": [], |
|
|
|
|
"source": [ |
|
|
|
|
"image = artist(\"New York City\")\n", |
|
|
|
|
"image = artist(\"Berlin\")\n", |
|
|
|
|
"display(image)" |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
@ -449,7 +449,7 @@
|
|
|
|
|
" # Play the generated audio\n", |
|
|
|
|
" display(Audio(output_filename, autoplay=True))\n", |
|
|
|
|
"\n", |
|
|
|
|
"talker(\"Well, hi there\")" |
|
|
|
|
"talker(\"Holla die Waldfee\")" |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
@ -478,7 +478,7 @@
|
|
|
|
|
" temp_path = os.path.join(temp_dir, \"temp_audio.wav\")\n", |
|
|
|
|
" try:\n", |
|
|
|
|
" audio_segment.export(temp_path, format=\"wav\")\n", |
|
|
|
|
" time.sleep(3) # Student Dominic found that this was needed. You could also try commenting out to see if not needed on your PC\n", |
|
|
|
|
" #time.sleep(3) # Student Dominic found that this was needed. You could also try commenting out to see if not needed on your PC\n", |
|
|
|
|
" subprocess.call([\n", |
|
|
|
|
" \"ffplay\",\n", |
|
|
|
|
" \"-nodisp\",\n", |
|
|
|
@ -508,7 +508,13 @@
|
|
|
|
|
{ |
|
|
|
|
"cell_type": "markdown", |
|
|
|
|
"id": "96f90e35-f71e-468e-afea-07b98f74dbcf", |
|
|
|
|
"metadata": {}, |
|
|
|
|
"metadata": { |
|
|
|
|
"editable": true, |
|
|
|
|
"slideshow": { |
|
|
|
|
"slide_type": "" |
|
|
|
|
}, |
|
|
|
|
"tags": [] |
|
|
|
|
}, |
|
|
|
|
"source": [ |
|
|
|
|
"## PC Variation 3" |
|
|
|
|
] |
|
|
|
@ -548,6 +554,20 @@
|
|
|
|
|
"talker(\"Well hi there\")" |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
"cell_type": "code", |
|
|
|
|
"execution_count": null, |
|
|
|
|
"id": "4bd65a9b-f79c-4f01-9e0b-0a7bf5f43e81", |
|
|
|
|
"metadata": {}, |
|
|
|
|
"outputs": [], |
|
|
|
|
"source": [ |
|
|
|
|
"from IPython.display import Audio\n", |
|
|
|
|
"\n", |
|
|
|
|
"# Use a simple audio file for testing\n", |
|
|
|
|
"audio = Audio(url=\"https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3\")\n", |
|
|
|
|
"display(audio)" |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
"cell_type": "markdown", |
|
|
|
|
"id": "e821224c-b069-4f9b-9535-c15fdb0e411c", |
|
|
|
|