{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!pip install git+https://github.com/declare-lab/TangoFlux.git" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import IPython\n", "import torchaudio\n", "from tangoflux import TangoFluxInference\n", "from IPython.display import Audio\n", "\n", "model = TangoFluxInference(name='declare-lab/TangoFlux')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# @title Generate Audio\n", "\n", "prompt = 'Hammer slowly hitting the wooden table' # @param {type:\"string\"}\n", "duration = 10 # @param {type:\"number\"}\n", "steps = 50 # @param {type:\"number\"}\n", "\n", "audio = model.generate(prompt, steps=steps, duration=duration)\n", "\n", "Audio(data=audio, rate=44100)" ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 2 }