Browse Source

Cleared all output cells, week2 day5 challenge

pull/190/head
nssuu 3 months ago
parent
commit
633fb081b6
  1. 99
      week2/community-contributions/day5-voice-to-text-converter-for-hearing-impaired-people.ipynb

99
week2/community-contributions/day5-voice-to-text-converter-for-hearing-impaired-people.ipynb

@ -21,7 +21,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 80, "execution_count": null,
"id": "3e214aa3-a977-434f-a436-90a89b81a5ee", "id": "3e214aa3-a977-434f-a436-90a89b81a5ee",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -35,18 +35,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 81, "execution_count": null,
"id": "d654cb96-9bcd-4b64-bd79-2d27fa6a62d0", "id": "d654cb96-9bcd-4b64-bd79-2d27fa6a62d0",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"OpenAI API Key exists and begins sk-proj-\n"
]
}
],
"source": [ "source": [
"load_dotenv(override=True)\n", "load_dotenv(override=True)\n",
"\n", "\n",
@ -62,7 +54,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 82, "execution_count": null,
"id": "b2d9214f-25d0-4f09-ba88-641beeaa20db", "id": "b2d9214f-25d0-4f09-ba88-641beeaa20db",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -74,7 +66,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 83, "execution_count": null,
"id": "3d9a1478-08bf-4195-8f38-34c29757012f", "id": "3d9a1478-08bf-4195-8f38-34c29757012f",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -93,35 +85,17 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 84, "execution_count": null,
"id": "93a3d7ee-78c2-4e19-b7e4-8239b07aaecc", "id": "93a3d7ee-78c2-4e19-b7e4-8239b07aaecc",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"Tool get_songs_with_sign_language called for rock\n"
]
},
{
"data": {
"text/plain": [
"('Bohemian Rhapsody', 'https://www.youtube.com/watch?v=sjln9OMOw-0', 'Queen')"
]
},
"execution_count": 84,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"get_songs_with_sign_language(\"rock\")" "get_songs_with_sign_language(\"rock\")"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 85, "execution_count": null,
"id": "7307aa61-86fe-4c46-9f9d-faa3d1fb1eb7", "id": "7307aa61-86fe-4c46-9f9d-faa3d1fb1eb7",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -145,7 +119,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 86, "execution_count": null,
"id": "160d790c-dda6-4c6e-b814-8be64ca7086b", "id": "160d790c-dda6-4c6e-b814-8be64ca7086b",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -155,7 +129,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 87, "execution_count": null,
"id": "96cdf319-11cd-4be2-8830-097225047d65", "id": "96cdf319-11cd-4be2-8830-097225047d65",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -176,7 +150,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 88, "execution_count": null,
"id": "bbd8ad0c-135b-406f-8ab9-0e1f9b58538d", "id": "bbd8ad0c-135b-406f-8ab9-0e1f9b58538d",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -201,20 +175,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 89, "execution_count": null,
"id": "69f43096-3557-4218-b0de-bd286237fdeb", "id": "69f43096-3557-4218-b0de-bd286237fdeb",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"Listening... Speak now!\n",
"Processing speech...\n",
"Sorry, I could not understand what you said.\n"
]
}
],
"source": [ "source": [
"import speech_recognition as sr\n", "import speech_recognition as sr\n",
"from pydub import AudioSegment\n", "from pydub import AudioSegment\n",
@ -248,7 +212,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 90, "execution_count": null,
"id": "23c9deeb-d9ad-439a-a39d-7eac9553bd5e", "id": "23c9deeb-d9ad-439a-a39d-7eac9553bd5e",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -262,41 +226,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 78, "execution_count": null,
"id": "32d3ea9f-fe3c-4cc5-9902-550c63c58a69", "id": "32d3ea9f-fe3c-4cc5-9902-550c63c58a69",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"* Running on local URL: http://127.0.0.1:7892\n",
"* Running on public URL: https://f9549e6cf738e17cc7.gradio.live\n",
"\n",
"This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from the terminal in the working directory to deploy to Hugging Face Spaces (https://huggingface.co/spaces)\n"
]
},
{
"data": {
"text/html": [
"<div><iframe src=\"https://f9549e6cf738e17cc7.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": []
},
"execution_count": 78,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"import gradio as gr\n", "import gradio as gr\n",
"\n", "\n",

Loading…
Cancel
Save