github gradio-app/gradio v2.9.0

latest releases: gradio@4.44.0, @gradio/core@0.0.4, @gradio/audio@0.13.5...
2 years ago

Here's what's new in 2.9.0:

1. Audio Streaming 🎀

Gradio now supports audio streaming, with a mixture of live=True and gradio.inputs.State.

Here's an example, the following code creates the interface below it. You can also find another demo here, and check out this Real Time Speech Recognition guide.

import gradio as gr
from transformers import pipeline

p = pipeline("automatic-speech-recognition")

def transcribe(audio, state=""):
    state += p(audio)["text"] + " " 
    return state, state

gr.Interface(fn=transcribe, 
             inputs=[
                 gr.inputs.Audio(source="microphone", type="filepath"), 
                 "state"], 
             outputs=[
                 "text", 
                 "state"
             ],
             live=True).launch()

streaming

2. New Guides ✍️

3. API Docs Fixes 🐜

We made a few updates to our interface-specific API docs. You can read more about how to use them here.

  • Sample inputs will now be serialized correctly if pulled from examples. Fixes: #552
  • New related methods section that shows gradio helper functions for converting to the correct file type.
  • Added a copy button for code and styling that matches our website.

What's Changed

New Contributors

Full Changelog: v2.8.1...v2.9.0

Don't miss a new gradio release

NewReleases is sending notifications on new releases.