{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# More examples FastSpeech2" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "This tutorial is available as an IPython notebook at [malaya-speech/example/tts-more-fastspeech2](https://github.com/huseinzol05/malaya-speech/tree/master/example/tts-more-fastspeech2).\n", " \n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "This module is not language independent, so it not save to use on different languages. Pretrained models trained on hyperlocal languages.\n", " \n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "This is an application of malaya-speech Pipeline, read more about malaya-speech Pipeline at [malaya-speech/example/pipeline](https://github.com/huseinzol05/malaya-speech/tree/master/example/pipeline).\n", " \n", "
" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import malaya_speech\n", "import numpy as np\n", "from malaya_speech import Pipeline\n", "import matplotlib.pyplot as plt\n", "import IPython.display as ipd" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### List available FastSpeech2" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Size (MB)Quantized Size (MB)Understand punctuationIs lowercase
male12531.7TrueTrue
female12531.7TrueTrue
husein12531.7TrueTrue
haqkiem12531.7TrueTrue
female-singlish12531.7TrueTrue
osman12531.7TrueFalse
yasmin12531.7TrueFalse
yasmin-sdp12833.1TrueFalse
osman-sdp12833.1TrueFalse
\n", "
" ], "text/plain": [ " Size (MB) Quantized Size (MB) Understand punctuation \\\n", "male 125 31.7 True \n", "female 125 31.7 True \n", "husein 125 31.7 True \n", "haqkiem 125 31.7 True \n", "female-singlish 125 31.7 True \n", "osman 125 31.7 True \n", "yasmin 125 31.7 True \n", "yasmin-sdp 128 33.1 True \n", "osman-sdp 128 33.1 True \n", "\n", " Is lowercase \n", "male True \n", "female True \n", "husein True \n", "haqkiem True \n", "female-singlish True \n", "osman False \n", "yasmin False \n", "yasmin-sdp False \n", "osman-sdp False " ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "malaya_speech.tts.available_fastspeech2()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "`husein` voice contributed by [Husein-Zolkepli](https://www.linkedin.com/in/husein-zolkepli/), recorded using low-end microphone in a small room with no reverberation absorber.\n", "\n", "`haqkiem` voice contributed by [Haqkiem Hamdan](https://www.linkedin.com/in/haqkiem-daim/), recorded using high-end microphone in an audio studio.\n", "\n", "`female-singlish` voice contributed by [SG National Speech Corpus](https://www.imda.gov.sg/programme-listing/digital-services-lab/national-speech-corpus), recorded using high-end microphone in an audio studio." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Load FastSpeech2 model\n", "\n", "Fastspeech2 use text normalizer from Malaya, https://malaya.readthedocs.io/en/latest/load-normalizer.html#Load-normalizer,\n", "\n", "Make sure you install Malaya version > 4.0 to make it works, **to get better speech synthesis, make sure Malaya version > 4.9.1**,\n", "\n", "```bash\n", "pip install malaya -U\n", "```" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "scrolled": true }, "outputs": [], "source": [ "male = malaya_speech.tts.fastspeech2(model = 'male')\n", "female = malaya_speech.tts.fastspeech2(model = 'female')\n", "husein = malaya_speech.tts.fastspeech2(model = 'husein')\n", "haqkiem = malaya_speech.tts.fastspeech2(model = 'haqkiem')" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "yasmin = malaya_speech.tts.fastspeech2(model = 'yasmin')\n", "osman = malaya_speech.tts.fastspeech2(model = 'osman')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Load Vocoder model\n", "\n", "I will use MelGAN in this example. **But, make sure speakers are same. If use female fastspeech2, need to use female MelGAN also**." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "INFO:root:running vocoder-melgan/male using device /device:CPU:0\n", "INFO:root:running vocoder-melgan/female using device /device:CPU:0\n", "INFO:root:running vocoder-melgan/husein using device /device:CPU:0\n", "INFO:root:running vocoder-melgan/haqkiem using device /device:CPU:0\n" ] } ], "source": [ "vocoder_male = malaya_speech.vocoder.melgan(model = 'male')\n", "vocoder_female = malaya_speech.vocoder.melgan(model = 'female')\n", "vocoder_husein = malaya_speech.vocoder.melgan(model = 'husein')\n", "vocoder_haqkiem = malaya_speech.vocoder.melgan(model = 'haqkiem')" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "universal_melgan = malaya_speech.vocoder.melgan(model = 'universal-1024')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Predict" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "string = 'Masa aku kat kuala lumpur, ada main mintak rasuah. Aku cakap kat agensi kerajaan tu. Dia cuma kata tak payah bagi. Tak ambik nama pun. mungkin itu la kot selemah lemah iman, tolak dalam hati tapi tak mampu buat tindakan.'" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 4.06 s, sys: 1.71 s, total: 5.77 s\n", "Wall time: 4.46 s\n" ] } ], "source": [ "%%time\n", "\n", "r_male = male.predict(string)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 4.22 s, sys: 1.75 s, total: 5.97 s\n", "Wall time: 4.55 s\n" ] } ], "source": [ "%%time\n", "\n", "r_female = female.predict(string)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 4.14 s, sys: 1.76 s, total: 5.91 s\n", "Wall time: 4.62 s\n" ] } ], "source": [ "%%time\n", "\n", "r_husein = husein.predict(string)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 4.14 s, sys: 1.66 s, total: 5.8 s\n", "Wall time: 4.44 s\n" ] } ], "source": [ "%%time\n", "\n", "r_haqkiem = haqkiem.predict(string)" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 1.8 s, sys: 118 ms, total: 1.92 s\n", "Wall time: 320 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_yasmin = yasmin.predict(string)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 1.46 s, sys: 143 ms, total: 1.61 s\n", "Wall time: 588 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_osman = osman.predict(string)" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = vocoder_male(r_male['mel-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = vocoder_female(r_female['mel-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = vocoder_husein(r_husein['mel-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = vocoder_haqkiem(r_haqkiem['mel-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = universal_melgan(r_yasmin['universal-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = universal_melgan(r_osman['universal-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "string = 'husein busuk masam ketiak pun masam tapi nasib baik comel'" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 368 ms, sys: 72.7 ms, total: 440 ms\n", "Wall time: 114 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_male = male.predict(string)" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 442 ms, sys: 56.3 ms, total: 498 ms\n", "Wall time: 112 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_female = female.predict(string)" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 407 ms, sys: 54.4 ms, total: 461 ms\n", "Wall time: 95.9 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_husein = husein.predict(string)" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 393 ms, sys: 51 ms, total: 444 ms\n", "Wall time: 92.2 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_haqkiem = haqkiem.predict(string)" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 384 ms, sys: 62.6 ms, total: 446 ms\n", "Wall time: 100 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_yasmin = yasmin.predict(string)" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 409 ms, sys: 69.1 ms, total: 478 ms\n", "Wall time: 101 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_osman = osman.predict(string)" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = vocoder_male(r_male['mel-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = vocoder_female(r_female['mel-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = vocoder_husein(r_husein['mel-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = vocoder_haqkiem(r_haqkiem['mel-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = universal_melgan(r_yasmin['universal-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = universal_melgan(r_osman['universal-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [], "source": [ "string = 'emel saya ialah husein.zol123456@gmail.com, dan emel ini adalah palsuu'" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 652 ms, sys: 55 ms, total: 707 ms\n", "Wall time: 145 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_male = male.predict(string)" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 802 ms, sys: 47.5 ms, total: 849 ms\n", "Wall time: 163 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_female = female.predict(string)" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 867 ms, sys: 63.8 ms, total: 930 ms\n", "Wall time: 171 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_husein = husein.predict(string)" ] }, { "cell_type": "code", "execution_count": 29, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 744 ms, sys: 52.5 ms, total: 796 ms\n", "Wall time: 157 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_haqkiem = haqkiem.predict(string)" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 782 ms, sys: 66.2 ms, total: 848 ms\n", "Wall time: 159 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_yasmin = yasmin.predict(string)" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 810 ms, sys: 63.6 ms, total: 873 ms\n", "Wall time: 159 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_osman = osman.predict(string)" ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 30, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = vocoder_male(r_male['mel-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 31, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 31, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = vocoder_female(r_female['mel-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 32, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 32, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = vocoder_husein(r_husein['mel-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = vocoder_haqkiem(r_haqkiem['mel-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = universal_melgan(r_yasmin['universal-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = universal_melgan(r_osman['universal-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [], "source": [ "# https://www.sinarharian.com.my/article/116460/BERITA/Nasional/Tiada-isu-kartel-daging-ketika-jadi-PM-Najib\n", "string = 'Najib berkata, walaupun media melaporkan ia telah berlaku sejak 40 tahun lalu, kerajaan Barisan Nasional (BN) tidak pernah menerima apa-apa aduan rasmi berhubung perkara itu.'" ] }, { "cell_type": "code", "execution_count": 35, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 1.12 s, sys: 101 ms, total: 1.22 s\n", "Wall time: 249 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_male = male.predict(string)" ] }, { "cell_type": "code", "execution_count": 36, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 1.28 s, sys: 88.2 ms, total: 1.36 s\n", "Wall time: 254 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_female = female.predict(string)" ] }, { "cell_type": "code", "execution_count": 37, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 1.32 s, sys: 95.2 ms, total: 1.41 s\n", "Wall time: 257 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_husein = husein.predict(string)" ] }, { "cell_type": "code", "execution_count": 38, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 1.21 s, sys: 85.7 ms, total: 1.3 s\n", "Wall time: 220 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_haqkiem = haqkiem.predict(string)" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 1.47 s, sys: 98.6 ms, total: 1.57 s\n", "Wall time: 267 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_yasmin = yasmin.predict(string)" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 1.38 s, sys: 108 ms, total: 1.49 s\n", "Wall time: 250 ms\n" ] } ], "source": [ "%%time\n", "\n", "r_osman = osman.predict(string)" ] }, { "cell_type": "code", "execution_count": 39, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 39, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = vocoder_male(r_male['mel-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 40, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 40, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = vocoder_female(r_female['mel-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 41, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 41, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = vocoder_husein(r_husein['mel-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 42, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 42, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = vocoder_haqkiem(r_haqkiem['mel-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = universal_melgan(r_yasmin['universal-output'])\n", "ipd.Audio(y_, rate = 22050)" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y_ = universal_melgan(r_osman['universal-output'])\n", "ipd.Audio(y_, rate = 22050)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" }, "varInspector": { "cols": { "lenName": 16, "lenType": 16, "lenVar": 40 }, "kernels_config": { "python": { "delete_cmd_postfix": "", "delete_cmd_prefix": "del ", "library": "var_list.py", "varRefreshCmd": "print(var_dic_list())" }, "r": { "delete_cmd_postfix": ") ", "delete_cmd_prefix": "rm(", "library": "var_list.r", "varRefreshCmd": "cat(var_dic_list()) " } }, "types_to_exclude": [ "module", "function", "builtin_function_or_method", "instance", "_Feature" ], "window_display": false } }, "nbformat": 4, "nbformat_minor": 4 }