{
  "id": "task_libraries:speech-recognition/python",
  "path": "/exapedia/python-speech-recognition-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python speech recognition libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python speech recognition libraries turn recorded or live audio into text. Many run a trained model such as Whisper on the local machine rather than sending audio to a hosted service. These libraries let voice agents, meeting tools, and captioning apps act on what people say."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python speech recognition libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#transformers",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F126"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#faster-whisper",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F147"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#speechrecognition",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F166"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#whisper",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F185"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F187"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#torchaudio",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F204"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#sherpa-onnx",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F224"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#speechbrain",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F240"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#vosk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F260"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F267"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F264"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "PyPI"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#transformers",
          "label": [
            {
              "t": "text",
              "text": "Transformers"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F127"
        },
        {
          "t": "text",
          "text": ", a count that covers every model task in the library."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Local decoding",
            "Stateful streaming"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#transformers",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F126"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#faster-whisper",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F147"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F156"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#speechrecognition",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F166"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#whisper",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F185"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F193"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#torchaudio",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F204"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#sherpa-onnx",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F224"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#speechbrain",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F240"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F250"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F251"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#vosk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F260"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F268"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F269"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "transformers",
          "name": [
            {
              "t": "fact",
              "fact": "F126"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/huggingface/transformers"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/transformers"
            },
            {
              "label": "Docs",
              "href": "https://huggingface.co/docs/transformers/v5.23.0/en/main_classes/pipelines"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F133"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://huggingface.co/docs/transformers/v5.23.0/en/main_classes/pipelines",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F126"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/gradio-app/gradio",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F145"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def transcribe(stream, new_chunk):\n    sr, y = new_chunk\n\n    # Convert to mono if stereo\n    if y.ndim > 1:\n        y = y.mean(axis=1)\n\n    y = y.astype(np.float32)\n    y /= np.max(np.abs(y))\n\n    if stream is not None:\n        stream = np.concatenate([stream, y])\n    else:\n        stream = y\n    return stream, transcriber({\"sampling_rate\": sr, \"raw\": stream})[\"text\"]  # type: ignore\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/gradio-app/gradio/blob/ec06278ed72e5eb73494a9d171ca851d553dc82a/demo/stream_asr/run.py#L7-L21",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F144"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=transformers%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F126"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from transformers import pipeline\n\ntranscriber = pipeline(\"automatic-speech-recognition\", model=\"openai/whisper-base.en\", device=\"cpu\")\nprint(transcriber(\"audio.wav\")[\"text\"])\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/huggingface/transformers/blob/52b080b6416a7897e2af90febeb4dfad22b84d19/src/transformers/pipelines/__init__.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "automatic_speech_recognition.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F131"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "faster-whisper",
          "name": [
            {
              "t": "fact",
              "fact": "F147"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/SYSTRAN/faster-whisper"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/faster-whisper"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F12"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/SYSTRAN/faster-whisper",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F147"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F20"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/jhj0517/Whisper-WebUI",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F164"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def update_model(self,\n                 model_size: str,\n                 compute_type: str,\n                 progress: gr.Progress = gr.Progress()\n                 ):\n    \"\"\"\n    Update current model setting\n\n    Parameters\n    ----------\n    model_size: str\n        Size of whisper model. If you enter the huggingface repo id, it will try to download the model\n        automatically from huggingface.\n    compute_type: str\n        Compute type for transcription.\n        see more info : https://opennmt.net/CTranslate2/quantization.html\n    progress: gr.Progress\n        Indicator to show progress directly in gradio.\n    \"\"\"\n    progress(0, desc=\"Initializing Model..\")\n\n    model_size_dirname = model_size.replace(\"/\", \"--\") if \"/\" in model_size else model_size\n    if model_size not in self.model_paths and model_size_dirname not in self.model_paths:\n        print(f\"Model is not detected. Trying to download \\\"{model_size}\\\" from huggingface to \"\n              f\"\\\"{os.path.join(self.model_dir, model_size_dirname)} ...\")\n        huggingface_hub.snapshot_download(\n            model_size,\n            local_dir=os.path.join(self.model_dir, model_size_dirname),\n        )\n        self.model_paths = self.get_model_paths()\n        gr.Info(f\"Model is downloaded with the name \\\"{model_size_dirname}\\\"\")\n\n    self.current_model_size = self.model_paths[model_size_dirname]\n\n    local_files_only = False\n    hf_prefix = \"models--Systran--faster-whisper-\"\n    official_model_path = os.path.join(self.model_dir, hf_prefix+model_size)\n    if ((os.path.isdir(self.current_model_size) and os.path.exists(self.current_model_size)) or\n        (model_size in faster_whisper.available_models() and os.path.exists(official_model_path))):\n        local_files_only = True\n\n    self.current_compute_type = compute_type\n    self.model = faster_whisper.WhisperModel(\n        device=self.device,\n        model_size_or_path=self.current_model_size,\n        download_root=self.model_dir,\n        compute_type=self.current_compute_type,\n        local_files_only=local_files_only\n    )\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/jhj0517/Whisper-WebUI/blob/c3bb3b18e959826b28b1192486a8d5b361b6a4e0/modules/whisper/faster_whisper_inference.py#L117-L165",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F163"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20faster-whisper%20for%20microphone%20transcription%2C%20offline%20recognition%2C%20model%20switching%20and%20speech-enabled%20interfaces&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F147"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from faster_whisper import WhisperModel\n\nmodel = WhisperModel(\"tiny\", device=\"cpu\", compute_type=\"int8\")\nsegments, info = model.transcribe(\"audio.mp3\")\nfor segment in segments:\n    print(segment.text)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/SYSTRAN/faster-whisper/blob/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F152"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "speechrecognition",
          "name": [
            {
              "t": "fact",
              "fact": "F166"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/Uberi/speech_recognition"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/SpeechRecognition"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F36"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/Uberi/speech_recognition",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F166"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F37"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F38"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/realpython/python-speech-recognition",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F183"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def recognize_speech_from_mic(recognizer, microphone):\n    \"\"\"Transcribe speech from recorded from `microphone`.\n\n    Returns a dictionary with three keys:\n    \"success\": a boolean indicating whether or not the API request was\n               successful\n    \"error\":   `None` if no error occured, otherwise a string containing\n               an error message if the API could not be reached or\n               speech was unrecognizable\n    \"transcription\": `None` if speech could not be transcribed,\n               otherwise a string containing the transcribed text\n    \"\"\"\n    # check that recognizer and microphone arguments are appropriate type\n    if not isinstance(recognizer, sr.Recognizer):\n        raise TypeError(\"`recognizer` must be `Recognizer` instance\")\n\n    if not isinstance(microphone, sr.Microphone):\n        raise TypeError(\"`microphone` must be `Microphone` instance\")\n\n    # adjust the recognizer sensitivity to ambient noise and record audio\n    # from the microphone\n    with microphone as source:\n        recognizer.adjust_for_ambient_noise(source)\n        audio = recognizer.listen(source)\n\n    # set up the response object\n    response = {\n        \"success\": True,\n        \"error\": None,\n        \"transcription\": None\n    }\n\n    # try recognizing the speech in the recording\n    # if a RequestError or UnknownValueError exception is caught,\n    #     update the response object accordingly\n    try:\n        response[\"transcription\"] = recognizer.recognize_google(audio)\n    except sr.RequestError:\n        # API was unreachable or unresponsive\n        response[\"success\"] = False\n        response[\"error\"] = \"API unavailable\"\n    except sr.UnknownValueError:\n        # speech was unintelligible\n        response[\"error\"] = \"Unable to recognize speech\"\n\n    return response\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/realpython/python-speech-recognition/blob/0c07b810808c01144a9611faf84739f24513184e/guessing_game.py#L7-L52",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F182"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20SpeechRecognition%20for%20microphone%20transcription%2C%20offline%20recognition%2C%20model%20switching%20and%20speech-enabled%20interfaces&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F166"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import speech_recognition as sr\n\nr = sr.Recognizer()\naudio = sr.AudioData.from_file(\"audio.wav\")\nprint(r.recognize_google(audio))\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/Uberi/speech_recognition/blob/3.17.0/examples/audio_transcribe.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "microphone_recognition.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F171"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "whisper",
          "name": [
            {
              "t": "fact",
              "fact": "F185"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/openai/whisper"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/openai-whisper"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F62"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F187"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/openai/whisper",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F185"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F63"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F64"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F70"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/oobabooga/textgen",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F202"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def do_stt(audio, whisper_language):\n    # use pydub to convert sample_rate and sample_width for whisper input\n    dubaudio = AudioSegment.from_file(io.BytesIO(audio))\n    dubaudio = dubaudio.set_channels(1)\n    dubaudio = dubaudio.set_frame_rate(16000)\n    dubaudio = dubaudio.set_sample_width(2)\n\n    # same method to get the array as openai whisper repo used from wav file\n    audio_np = np.frombuffer(dubaudio.raw_data, np.int16).flatten().astype(np.float32) / 32768.0\n\n    if len(whisper_language) == 0:\n        result = WHISPERMODEL.transcribe(audio=audio_np)\n    else:\n        result = WHISPERMODEL.transcribe(audio=audio_np, language=whisper_language)\n    return result[\"text\"]\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/oobabooga/textgen/blob/c93f8871239550de2ccfe1e95d469aa82616f07e/extensions/whisper_stt/script.py#L39-L53",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F201"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20openai-whisper%20for%20microphone%20transcription%2C%20offline%20recognition%2C%20model%20switching%20and%20speech-enabled%20interfaces&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F185"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import whisper\n\nmodel = whisper.load_model(\"turbo\")\nresult = model.transcribe(\"audio.mp3\")\nprint(result[\"text\"])\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/openai/whisper/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F190"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "torchaudio",
          "name": [
            {
              "t": "fact",
              "fact": "F204"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/pytorch/audio"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/torchaudio"
            },
            {
              "label": "Docs",
              "href": "https://docs.pytorch.org/audio/2.11.1/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F211"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.pytorch.org/audio/2.11.1/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F204"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/twosixlabs/armory",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F222"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def forward(self, x, transcript=True):\n    if len(x) != 1:\n        raise NotImplementedError(\"batch size should be 1\")\n    if self.bundle.sample_rate != self.source_sample_rate:\n        x = torchaudio.functional.resample(\n            x, self.source_sample_rate, self.bundle.sample_rate\n        )\n\n    emissions, _ = self.model(x)\n    if transcript:\n        return self.decoder(emissions)\n    else:\n        return emissions\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/twosixlabs/armory/blob/1131eadc2e3863677fd3e82b1ebb9350ff661a41/armory/baseline_models/pytorch/hubert_asr_large.py#L75-L87",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F221"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=torchaudio%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F204"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import torchaudio\n\nbundle = torchaudio.pipelines.WAV2VEC2_ASR_BASE_960H\nmodel = bundle.get_model()\nprint(bundle.get_labels())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/pytorch/audio/blob/455331b1b3bb4aabfe3228f6f911fc3f11ae93b1/src/torchaudio/pipelines/__init__.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "impl.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F209"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "sherpa-onnx",
          "name": [
            {
              "t": "fact",
              "fact": "F224"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/k2-fsa/sherpa-onnx"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/sherpa-onnx"
            },
            {
              "label": "Docs",
              "href": "https://k2-fsa.github.io/sherpa/onnx/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F231"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://k2-fsa.github.io/sherpa/onnx/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F224"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import wave\nimport numpy as np\nimport sherpa_onnx\n\nrecognizer = sherpa_onnx.OfflineRecognizer.from_nemo_ctc(\n    model=\"model.onnx\", tokens=\"tokens.txt\"\n)\nwith wave.open(\"speech.wav\", \"rb\") as wav:\n    assert wav.getnchannels() == 1 and wav.getsampwidth() == 2\n    samples = np.frombuffer(wav.readframes(wav.getnframes()), dtype=np.int16).astype(np.float32) / 32768\n    sample_rate = wav.getframerate()\nstream = recognizer.create_stream()\nstream.accept_waveform(sample_rate, samples)\nrecognizer.decode_stream(stream)\nprint(stream.result.text)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/k2-fsa/sherpa-onnx/blob/af2d8d81dbfa61c4cea4c568da78f3982edca005/python-api-examples/offline-decode-files.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "offline-decode-files.py"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=sherpa-onnx%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F224"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F229"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "speechbrain",
          "name": [
            {
              "t": "fact",
              "fact": "F240"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/speechbrain/speechbrain"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/speechbrain"
            },
            {
              "label": "Docs",
              "href": "https://speechbrain.readthedocs.io/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F247"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F243"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://speechbrain.readthedocs.io/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F240"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F258"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F259"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/speechbrain/benchmarks",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F258"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def transcribe_batch_with_details(self, wavs, wav_lens):\n    \"\"\"Transcribes the input audio into a sequence of words\n\n    The waveforms should already be in the model's desired format.\n    You can call:\n    ``normalized = EncoderDecoderASR.normalizer(signal, sample_rate)``\n    to get a correctly converted signal in most cases.\n\n    Arguments\n    ---------\n    predicted_words : list\n        The raw ASR predictions, fully decoded\n    best_scores : list\n        The best scores (from beam search)\n    best_log_probs : list\n        The best predicted log-probabilities (from beam search)\n\n\n    Returns\n    -------\n    predicted_words : list\n        The predictions\n\n    best_scores : torch.Tensor\n        The best scores (from beam search)\n\n    best_log_probs : torch.Tensor\n        The best log-probabilities\n\n    \"\"\"\n    with torch.no_grad():\n        wav_lens = wav_lens.to(self.device)\n        encoder_out = self.asr.encode_batch(wavs, wav_lens)\n        (\n            hyps,\n            best_lens,\n            best_scores,\n            best_log_probs,\n        ) = self.asr.mods.decoder(encoder_out, wav_lens)\n        predicted_words = [\n            self.asr.tokenizer.decode_ids(token_seq) for token_seq in hyps\n        ]\n    return predicted_words, best_scores, best_log_probs\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/speechbrain/benchmarks/blob/413fa853fad7e792be2965fdd09600d33ad3a965/benchmarks/DASB/utils/eval.py#L447-L489",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F257"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=speechbrain%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F240"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from speechbrain.inference import EncoderDecoderASR\n\nasr_model = EncoderDecoderASR.from_hparams(source=\"speechbrain/asr-conformer-transformerlm-librispeech\", savedir=\"pretrained_models/asr-transformer-transformerlm-librispeech\")\nasr_model.transcribe_file(\"speechbrain/asr-conformer-transformerlm-librispeech/example.wav\")\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/speechbrain/speechbrain/blob/develop/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F245"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "vosk",
          "name": [
            {
              "t": "fact",
              "fact": "F260"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/alphacep/vosk-api"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/vosk"
            },
            {
              "label": "Docs",
              "href": "https://alphacephei.com/vosk/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F89"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F267"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F263"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://alphacephei.com/vosk/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F260"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F90"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F91"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F92"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F93"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F94"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F95"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F277"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F278"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/alphacep/vosk-server",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F277"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def process_chunk(rec, message):\n    if message == '{\"eof\" : 1}':\n        return rec.FinalResult(), True\n    if message == '{\"reset\" : 1}':\n        return rec.FinalResult(), False\n    elif rec.AcceptWaveform(message):\n        return rec.Result(), False\n    else:\n        return rec.PartialResult(), False\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/alphacep/vosk-server/blob/47998a26f232252f7baaed53dd8ce89d38bbfbce/websocket/asr_server.py#L13-L21",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F276"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20vosk%20for%20microphone%20transcription%2C%20offline%20recognition%2C%20model%20switching%20and%20speech-enabled%20interfaces&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F260"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import wave\nfrom vosk import Model, KaldiRecognizer\n\nmodel = Model(lang=\"en-us\")\nwith wave.open(\"speech.wav\", \"rb\") as wav:\n    assert wav.getnchannels() == 1 and wav.getsampwidth() == 2\n    recognizer = KaldiRecognizer(model, wav.getframerate())\n    recognizer.AcceptWaveform(wav.readframes(wav.getnframes()))\nprint(recognizer.FinalResult())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/alphacep/vosk-api/blob/v0.3.45/python/example/test_simple.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "test_simple.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F265"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python speech recognition library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#faster-whisper",
          "label": [
            {
              "t": "text",
              "text": "faster-whisper"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits local Whisper transcription with batched inference and word timestamps. "
        },
        {
          "t": "link",
          "href": "#vosk",
          "label": [
            {
              "t": "text",
              "text": "Vosk"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits offline streaming recognition. "
        },
        {
          "t": "link",
          "href": "#speechrecognition",
          "label": [
            {
              "t": "text",
              "text": "SpeechRecognition"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits code that switches between hosted services and offline engines through one interface."
        }
      ]
    },
    {
      "q": "What is faster-whisper?",
      "a": [
        {
          "t": "link",
          "href": "#faster-whisper",
          "label": [
            {
              "t": "text",
              "text": "faster-whisper"
            }
          ]
        },
        {
          "t": "text",
          "text": " runs Whisper speech recognition on a separate inference engine, with batched inference and optional word timestamps. Its segments are a generator. Transcription starts when the code iterates over them."
        }
      ]
    },
    {
      "q": "What is SpeechBrain?",
      "a": [
        {
          "t": "link",
          "href": "#speechbrain",
          "label": [
            {
              "t": "text",
              "text": "SpeechBrain"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a PyTorch speech toolkit for pretrained inference and custom speech recognition training."
        }
      ]
    },
    {
      "q": "Does SpeechRecognition work offline?",
      "a": [
        {
          "t": "text",
          "text": "Only with a separate offline engine. Engines such as "
        },
        {
          "t": "link",
          "href": "#vosk",
          "label": [
            {
              "t": "text",
              "text": "Vosk"
            }
          ]
        },
        {
          "t": "text",
          "text": " must be installed on their own."
        }
      ]
    },
    {
      "q": "What is sherpa-onnx?",
      "a": [
        {
          "t": "link",
          "href": "#sherpa-onnx",
          "label": [
            {
              "t": "text",
              "text": "sherpa-onnx"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a local ONNX speech toolkit with separate streaming and offline recognizers."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, faster-whisper",
      "display": "faster-whisper",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, faster-whisper",
      "display": "19.0M",
      "asOf": "2026-11-16"
    },
    "F3": {
      "label": "License, faster-whisper",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, faster-whisper",
      "display": "1.2.1, Oct 2025",
      "asOf": "2025-10-31"
    },
    "F5": {
      "label": "Package release date, faster-whisper",
      "display": "Oct 2025",
      "asOf": "2025-10-31"
    },
    "F6": {
      "label": "Repository stars, faster-whisper",
      "display": "26.8K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Transcribes offline, faster-whisper",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Reads audio files, faster-whisper",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Streams live audio, faster-whisper",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Returns word timestamps, faster-whisper",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Install, faster-whisper",
      "display": "pip install faster-whisper",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "What it does, faster-whisper",
      "display": "Runs Whisper speech recognition through CTranslate2, with batched inference and optional word timestamps.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths lead, faster-whisper",
      "display": "Transcribes audio in batches",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths, faster-whisper",
      "display": "BatchedInferencePipeline adds batched transcription around a WhisperModel.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths lead, faster-whisper",
      "display": "Decodes files through bundled FFmpeg",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths, faster-whisper",
      "display": "PyAV supplies FFmpeg libraries without a separate system FFmpeg installation.",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations lead, faster-whisper",
      "display": "Segments are generated lazily",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations, faster-whisper",
      "display": "Iterate over segments to run transcription and collect the results.",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations lead, faster-whisper",
      "display": "GPU setup needs matching libraries",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "limitations, faster-whisper",
      "display": "Current GPU releases require matching CUDA and cuDNN libraries.",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Quickstart, faster-whisper",
      "display": "from faster_whisper import WhisperModel, BatchedInferencePipeline\n\nmodel = WhisperModel(\"turbo\", device=\"cuda\", compute_type=\"float16\")\nbatched_model = BatchedInferencePipeline(model=model)\nsegments, info = batched_model.transcribe(\"audio.mp3\", batch_size=16)\n\nfor segment in segments:\n    print(\"[%.2fs -> %.2fs] %s\" % (segment.start, segment.end, segment.text))\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function, faster-whisper",
      "display": "def update_model(self,\n                 model_size: str,\n                 compute_type: str,\n                 progress: gr.Progress = gr.Progress()\n                 ):\n    # ...\n    progress(0, desc=\"Initializing Model..\")\n\n    model_size_dirname = model_size.replace(\"/\", \"--\") if \"/\" in model_size else model_size\n    if model_size not in self.model_paths and model_size_dirname not in self.model_paths:\n        print(f\"Model is not detected. Trying to download \\\"{model_size}\\\" from huggingface to \"\n              f\"\\\"{os.path.join(self.model_dir, model_size_dirname)} ...\")\n        huggingface_hub.snapshot_download(\n            model_size,\n            local_dir=os.path.join(self.model_dir, model_size_dirname),\n        )\n        self.model_paths = self.get_model_paths()\n        gr.Info(f\"Model is downloaded with the name \\\"{model_size_dirname}\\\"\")\n\n    self.current_model_size = self.model_paths[model_size_dirname]\n\n    local_files_only = False\n    hf_prefix = \"models--Systran--faster-whisper-\"\n    official_model_path = os.path.join(self.model_dir, hf_prefix+model_size)\n    if ((os.path.isdir(self.current_model_size) and os.path.exists(self.current_model_size)) or\n        (model_size in faster_whisper.available_models() and os.path.exists(official_model_path))):\n        local_files_only = True\n\n    self.current_compute_type = compute_type\n    self.model = faster_whisper.WhisperModel(\n        device=self.device,\n        model_size_or_path=self.current_model_size,\n        download_root=self.model_dir,\n        compute_type=self.current_compute_type,\n        local_files_only=local_files_only\n    )\n",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project function reference, faster-whisper",
      "display": "faster_whisper_inference.py · update_model()",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project repository, faster-whisper",
      "display": "jhj0517/Whisper-WebUI",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project stars, jhj0517/Whisper-WebUI",
      "display": "2.9K",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Project push date, jhj0517/Whisper-WebUI",
      "display": "Dec 2025",
      "asOf": "2025-12-29"
    },
    "F27": {
      "label": "Library name, SpeechRecognition",
      "display": "SpeechRecognition",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "Monthly downloads, SpeechRecognition",
      "display": "6.7M",
      "asOf": "2026-11-16"
    },
    "F29": {
      "label": "License, SpeechRecognition",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Package release, SpeechRecognition",
      "display": "3.17.0, Jun 2026",
      "asOf": "2026-06-17"
    },
    "F31": {
      "label": "Package release date, SpeechRecognition",
      "display": "Jun 2026",
      "asOf": "2026-06-17"
    },
    "F32": {
      "label": "Repository stars, SpeechRecognition",
      "display": "9.0K",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Transcribes offline, SpeechRecognition",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Reads audio files, SpeechRecognition",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Install, SpeechRecognition",
      "display": "pip install SpeechRecognition[audio]",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "What it does, SpeechRecognition",
      "display": "Provides one Python interface to multiple online recognition services and optional offline speech engines.",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "strengths lead, SpeechRecognition",
      "display": "Switches between recognition engines",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "strengths, SpeechRecognition",
      "display": "Choose online services or local engines through the same recognizer interface.",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths lead, SpeechRecognition",
      "display": "Reads existing audio recordings",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths, SpeechRecognition",
      "display": "Load recorded audio files before passing them to a recognizer.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "limitations lead, SpeechRecognition",
      "display": "Microphone capture needs PyAudio",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "limitations, SpeechRecognition",
      "display": "Install microphone dependencies separately before recording speech.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations lead, SpeechRecognition",
      "display": "Offline engines need separate installs",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations, SpeechRecognition",
      "display": "Install the selected local engine before using its recognizer.",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "Quickstart, SpeechRecognition",
      "display": "#!/usr/bin/env python3\n\n# NOTE: this example requires PyAudio because it uses the Microphone class\n\nimport os\n\nimport speech_recognition as sr\n\n# obtain audio from the microphone\nr = sr.Recognizer()\nwith sr.Microphone() as source:\n    print(\"Say something!\")\n    audio = r.listen(source)\n\n# recognize speech using Sphinx\ntry:\n    print(\"Sphinx thinks you said \" + r.recognize_sphinx(audio))\nexcept sr.UnknownValueError:\n    print(\"Sphinx could not understand audio\")\nexcept sr.RequestError as e:\n    print(\"Sphinx error; {0}\".format(e))\n\n# recognize speech using Google Speech Recognition\ntry:\n    # for testing purposes, we're just using the default API key\n    # to use another API key, use `r.recognize_google(audio, key=\"GOOGLE_SPEECH_RECOGNITION_API_KEY\")`\n    # instead of `r.recognize_google(audio)`\n    print(\"Google Speech Recognition thinks you said \" + r.recognize_google(audio))\nexcept sr.UnknownValueError:\n    print(\"Google Speech Recognition could not understand audio\")\nexcept sr.RequestError as e:\n    print(\"Could not request results from Google Speech Recognition service; {0}\".format(e))\n\n# recognize speech using Google Cloud Speech\n# Before run, create local authentication credentials (``gcloud auth application-default login``)\ntry:\n    print(\"Google Cloud Speech thinks you said \" + r.recognize_google_cloud(audio))\nexcept sr.UnknownValueError:\n    print(\"Google Cloud Speech could not understand audio\")\nexcept sr.RequestError as e:\n    print(\"Could not request results from Google Cloud Speech service; {0}\".format(e))\n\n# recognize speech using Wit.ai\nWIT_AI_KEY = \"INSERT WIT.AI API KEY HERE\"  # Wit.ai keys are 32-character uppercase alphanumeric strings\ntry:\n    print(\"Wit.ai thinks you said \" + r.recognize_wit(audio, key=WIT_AI_KEY))\nexcept sr.UnknownValueError:\n    print(\"Wit.ai could not understand audio\")\nexcept sr.RequestError as e:\n    print(\"Could not request results from Wit.ai service; {0}\".format(e))\n\n# recognize speech using Microsoft Azure Speech\nAZURE_SPEECH_KEY = \"INSERT AZURE SPEECH API KEY HERE\"  # Microsoft Speech API keys 32-character lowercase hexadecimal strings\ntry:\n    print(\"Microsoft Azure Speech thinks you said \" + r.recognize_azure(audio, key=AZURE_SPEECH_KEY))\nexcept sr.UnknownValueError:\n    print(\"Microsoft Azure Speech could not understand audio\")\nexcept sr.RequestError as e:\n    print(\"Could not request results from Microsoft Azure Speech service; {0}\".format(e))\n\n# recognize speech using Houndify\nHOUNDIFY_CLIENT_ID = \"INSERT HOUNDIFY CLIENT ID HERE\"  # Houndify client IDs are Base64-encoded strings\nHOUNDIFY_CLIENT_KEY = \"INSERT HOUNDIFY CLIENT KEY HERE\"  # Houndify client keys are Base64-encoded strings\ntry:\n    print(\"Houndify thinks you said \" + r.recognize_houndify(audio, client_id=HOUNDIFY_CLIENT_ID, client_key=HOUNDIFY_CLIENT_KEY))\nexcept sr.UnknownValueError:\n    print(\"Houndify could not understand audio\")\nexcept sr.RequestError as e:\n    print(\"Could not request results from Houndify service; {0}\".format(e))\n\n# recognize speech using IBM Speech to Text\nIBM_USERNAME = \"INSERT IBM SPEECH TO TEXT USERNAME HERE\"  # IBM Speech to Text usernames are strings of the form XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\nIBM_PASSWORD = \"INSERT IBM SPEECH TO TEXT PASSWORD HERE\"  # IBM Speech to Text passwords are mixed-case alphanumeric strings\ntry:\n    print(\"IBM Speech to Text thinks you said \" + r.recognize_ibm(audio, username=IBM_USERNAME, password=IBM_PASSWORD))\nexcept sr.UnknownValueError:\n    print(\"IBM Speech to Text could not understand audio\")\nexcept sr.RequestError as e:\n    print(\"Could not request results from IBM Speech to Text service; {0}\".format(e))\n\n# recognize speech using whisper\ntry:\n    print(\"Whisper thinks you said \" + r.recognize_whisper(audio, language=\"english\"))\nexcept sr.UnknownValueError:\n    print(\"Whisper could not understand audio\")\nexcept sr.RequestError as e:\n    print(f\"Could not request results from Whisper; {e}\")\n\n# recognize speech using the OpenAI Transcription API\nOPENAI_API_KEY = \"INSERT OPENAI API KEY HERE\"\nos.environ[\"OPENAI_API_KEY\"] = OPENAI_API_KEY\ntry:\n    print(\n        \"OpenAI Transcription API thinks you said \"\n        f\"{r.recognize_openai(audio)}\"\n    )\nexcept sr.RequestError as e:\n    print(f\"Could not request results from OpenAI Transcription API; {e}\")\n",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Project function, SpeechRecognition",
      "display": "def recognize_speech_from_mic(recognizer, microphone):\n    # ...\n    # check that recognizer and microphone arguments are appropriate type\n    if not isinstance(recognizer, sr.Recognizer):\n        raise TypeError(\"`recognizer` must be `Recognizer` instance\")\n\n    if not isinstance(microphone, sr.Microphone):\n        raise TypeError(\"`microphone` must be `Microphone` instance\")\n\n    # adjust the recognizer sensitivity to ambient noise and record audio\n    # from the microphone\n    with microphone as source:\n        recognizer.adjust_for_ambient_noise(source)\n        audio = recognizer.listen(source)\n\n    # set up the response object\n    response = {\n        \"success\": True,\n        \"error\": None,\n        \"transcription\": None\n    }\n\n    # try recognizing the speech in the recording\n    # if a RequestError or UnknownValueError exception is caught,\n    #     update the response object accordingly\n    try:\n        response[\"transcription\"] = recognizer.recognize_google(audio)\n    except sr.RequestError:\n        # API was unreachable or unresponsive\n        response[\"success\"] = False\n        response[\"error\"] = \"API unavailable\"\n    except sr.UnknownValueError:\n        # speech was unintelligible\n        response[\"error\"] = \"Unable to recognize speech\"\n\n    return response\n",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project function reference, SpeechRecognition",
      "display": "guessing_game.py · recognize_speech_from_mic()",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project repository, SpeechRecognition",
      "display": "realpython/python-speech-recognition",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project stars, realpython/python-speech-recognition",
      "display": "250",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project push date, realpython/python-speech-recognition",
      "display": "Oct 2020",
      "asOf": "2020-10-02"
    },
    "F51": {
      "label": "Library name, openai-whisper",
      "display": "Whisper",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Monthly downloads, openai-whisper",
      "display": "6.2M",
      "asOf": "2026-11-16"
    },
    "F53": {
      "label": "License, openai-whisper",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Package release, openai-whisper",
      "display": "20250625, Jun 2025",
      "asOf": "2025-06-26"
    },
    "F55": {
      "label": "Package release date, openai-whisper",
      "display": "Jun 2025",
      "asOf": "2025-06-26"
    },
    "F56": {
      "label": "Repository stars, openai-whisper",
      "display": "112.8K",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Transcribes offline, openai-whisper",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Reads audio files, openai-whisper",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Returns word timestamps, openai-whisper",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Output formats, openai-whisper",
      "display": "JSON",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Install, openai-whisper",
      "display": "pip install -U openai-whisper",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "What it does, openai-whisper",
      "display": "Provides local multilingual speech recognition, language identification, and speech-to-English translation with Whisper models.",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths lead, openai-whisper",
      "display": "Recognizes speech across languages",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths, openai-whisper",
      "display": "Use multilingual models for transcription, translation, and language identification.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths lead, openai-whisper",
      "display": "Exposes lower-level decoding functions",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths, openai-whisper",
      "display": "Use detect_language and decode to control the decoding workflow.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "limitations lead, openai-whisper",
      "display": "Audio loading needs system FFmpeg",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "limitations, openai-whisper",
      "display": "Install the FFmpeg command-line tool alongside the Python package.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations lead, openai-whisper",
      "display": "Turbo skips translation into English",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "limitations, openai-whisper",
      "display": "Select a multilingual model trained for speech translation instead.",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Quickstart, openai-whisper",
      "display": "import whisper\n\nmodel = whisper.load_model(\"turbo\")\n\n# load audio and pad/trim it to fit 30 seconds\naudio = whisper.load_audio(\"audio.mp3\")\naudio = whisper.pad_or_trim(audio)\n\n# make log-Mel spectrogram and move to the same device as the model\nmel = whisper.log_mel_spectrogram(audio, n_mels=model.dims.n_mels).to(model.device)\n\n# detect the spoken language\n_, probs = model.detect_language(mel)\nprint(f\"Detected language: {max(probs, key=probs.get)}\")\n\n# decode the audio\noptions = whisper.DecodingOptions()\nresult = whisper.decode(model, mel, options)\n\n# print the recognized text\nprint(result.text)\n",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project function, openai-whisper",
      "display": "def do_stt(audio, whisper_language):\n    # use pydub to convert sample_rate and sample_width for whisper input\n    dubaudio = AudioSegment.from_file(io.BytesIO(audio))\n    dubaudio = dubaudio.set_channels(1)\n    dubaudio = dubaudio.set_frame_rate(16000)\n    dubaudio = dubaudio.set_sample_width(2)\n\n    # same method to get the array as openai whisper repo used from wav file\n    audio_np = np.frombuffer(dubaudio.raw_data, np.int16).flatten().astype(np.float32) / 32768.0\n\n    if len(whisper_language) == 0:\n        result = WHISPERMODEL.transcribe(audio=audio_np)\n    else:\n        result = WHISPERMODEL.transcribe(audio=audio_np, language=whisper_language)\n    return result[\"text\"]\n",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project function reference, openai-whisper",
      "display": "script.py · do_stt()",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project repository, openai-whisper",
      "display": "oobabooga/textgen",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Project stars, oobabooga/textgen",
      "display": "47.7K",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Project push date, oobabooga/textgen",
      "display": "Aug 2026",
      "asOf": "2026-08-17"
    },
    "F77": {
      "label": "Library name, vosk",
      "display": "Vosk",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Monthly downloads, vosk",
      "display": "1.2M",
      "asOf": "2026-11-16"
    },
    "F79": {
      "label": "License, vosk",
      "display": "Apache",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Package release, vosk",
      "display": "0.3.45, Dec 2022",
      "asOf": "2022-12-14"
    },
    "F81": {
      "label": "Package release date, vosk",
      "display": "Dec 2022",
      "asOf": "2022-12-14"
    },
    "F82": {
      "label": "Repository stars, vosk",
      "display": "15.3K",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Transcribes offline, vosk",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Reads audio files, vosk",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Streams live audio, vosk",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Returns word timestamps, vosk",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "Output formats, vosk",
      "display": "JSON",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "Install, vosk",
      "display": "pip install vosk",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "What it does, vosk",
      "display": "Runs offline speech recognition with per-language models and a streaming recognition interface.",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "strengths lead, vosk",
      "display": "Processes speech as audio arrives",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "strengths, vosk",
      "display": "Use its streaming API for continuous transcription.",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "strengths lead, vosk",
      "display": "Adapts vocabulary with supported models",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "strengths, vosk",
      "display": "Choose a dynamic-vocabulary model to restrict recognized phrases.",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "limitations lead, vosk",
      "display": "Vocabulary changes depend on model",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "limitations, vosk",
      "display": "Choose a dynamic-graph model when runtime vocabulary changes matter.",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Quickstart, vosk",
      "display": "#!/usr/bin/env python3\n\nimport wave\nimport sys\n\nfrom vosk import Model, KaldiRecognizer, SetLogLevel\n\n# You can set log level to -1 to disable debug messages\nSetLogLevel(0)\n\nwf = wave.open(sys.argv[1], \"rb\")\nif wf.getnchannels() != 1 or wf.getsampwidth() != 2 or wf.getcomptype() != \"NONE\":\n    print(\"Audio file must be WAV format mono PCM.\")\n    sys.exit(1)\n\nmodel = Model(lang=\"en-us\")\n\n# You can also init model by name or with a folder path\n# model = Model(model_name=\"vosk-model-en-us-0.21\")\n# model = Model(\"models/en\")\n\nrec = KaldiRecognizer(model, wf.getframerate())\nrec.SetWords(True)\nrec.SetPartialWords(True)\n\nwhile True:\n    data = wf.readframes(4000)\n    if len(data) == 0:\n        break\n    if rec.AcceptWaveform(data):\n        print(rec.Result())\n    else:\n        print(rec.PartialResult())\n\nprint(rec.FinalResult())\n",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Developer need",
      "display": "Switching recognition services",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Why choose SpeechRecognition",
      "display": "one interface for online services and local engines",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Developer need in introduction",
      "display": "switching recognition services",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Developer need",
      "display": "Incremental offline recognition",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Why choose vosk",
      "display": "a streaming speech-recognition API",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Developer need in introduction",
      "display": "incremental offline recognition",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Developer need",
      "display": "Batched Whisper transcription",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Why choose faster-whisper",
      "display": "the batched inference pipeline",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Developer need in introduction",
      "display": "batched Whisper transcription",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "When to consider openai-whisper",
      "display": "direct language detection and low-level decoding control matter",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Developer need",
      "display": "Language detection and decoding",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Why choose openai-whisper",
      "display": "direct access to language detection and decoding",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Developer need in introduction",
      "display": "language detection and decoding",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "When to consider faster-whisper",
      "display": "the application needs the batched inference pipeline",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Page introduction",
      "display": "Python speech recognition libraries let application developers turn speech audio into text.",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "FAQ: Which Python speech recognition library should I choose?",
      "display": "SpeechRecognition supports several online and offline engines.",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "FAQ: Which Python speech recognition library should I choose?",
      "display": "Vosk provides an offline streaming recognizer.",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "FAQ: Which Python speech recognition library should I choose?",
      "display": "faster-whisper provides batched Whisper inference.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: Which Python speech recognition library should I choose?",
      "display": "Whisper exposes lower-level language detection and decoding.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: Does SpeechRecognition work offline without an extra engine?",
      "display": "Offline engines such as Vosk must be installed separately.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Do I need PyAudio to transcribe an existing file?",
      "display": "SpeechRecognition requires PyAudio only for microphone input.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Why does faster-whisper return before transcription finishes?",
      "display": "Its segments are a generator; transcription starts when they are iterated.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: Is a separate FFmpeg installation required?",
      "display": "Whisper requires the system FFmpeg command-line tool.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Is a separate FFmpeg installation required?",
      "display": "faster-whisper decodes with PyAV, which bundles FFmpeg libraries.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Does a Whisper transcription iterator mean native live streaming?",
      "display": "Whisper transcribe reads the entire file and processes sliding windows.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Does a Whisper transcription iterator mean native live streaming?",
      "display": "faster-whisper links Whisper-Streaming as a separate real-time implementation.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Why does Whisper turbo return the original language for translation?",
      "display": "turbo is not trained for translation; use a multilingual translation-capable model.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Can every Vosk model change vocabulary at runtime?",
      "display": "Dynamic vocabulary support depends on the chosen model.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: Does the Vosk code license also cover every downloadable model?",
      "display": "The Vosk model list supplies a separate license for each model.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "Library name, transformers",
      "display": "Transformers",
      "asOf": "2026-11-20"
    },
    "F127": {
      "label": "Monthly downloads, transformers",
      "display": "119.8M",
      "asOf": "2026-11-20"
    },
    "F128": {
      "label": "License, transformers",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F129": {
      "label": "Package release, transformers",
      "display": "5.23.0",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "Package release date, transformers",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Install, transformers",
      "display": "pip install \"transformers[torch]\"",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Quickstart, transformers",
      "display": "from transformers import pipeline\n\ntranscriber = pipeline(\"automatic-speech-recognition\", model=\"openai/whisper-base.en\", device=\"cpu\")\nprint(transcriber(\"audio.wav\")[\"text\"])\n",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Official description, transformers",
      "display": "Defines machine learning models for text, vision, audio, and multimodal tasks.",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Quickstart source file, transformers",
      "display": "src/transformers/pipelines/automatic_speech_recognition.py",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Repository stars, transformers",
      "display": "169.2K",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Local decoding, transformers",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Stateful streaming, transformers",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Recognition API and model role, transformers",
      "display": "General-purpose model SDK with a direct ASR pipeline plus model-specific streaming speech APIs. Whole-distribution downloads cover many non-ASR tasks.",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Python requirement, transformers",
      "display": ">=3.11.0",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "First-call prerequisites, transformers",
      "display": "[\"Disclosed minimal official-API recipe using the same supported Whisper model as the original Gradio application. Provide audio.wav and install system FFmpeg for file decoding. Model/tokenizer/feature-extractor assets download/cache on first use; internet and writable cache are required unless already cached. CPU PyTorch path shown; English-only base.en model is deliberate. This first call is offline-file transcription,not a VoxtralRealtime streaming session.\"]",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Original project API contract, transformers",
      "display": "{\"status\": \"verified\", \"arguments\": \"The original Gradio module binds transcriber=pipeline(\\\"automatic-speech-recognition\\\",model=\\\"openai/whisper-base.en\\\"). Current5.23.0 supports the task/model factory arguments and the dict input containing a positive sampling_rate and a one-dimensional float32 raw numpy array. The original function downmixes stereo,normalizes each incoming chunk,and concatenates all prior samples before calling the model. Caller prerequisites: a nonempty,nonzero-energy chunk (the original divides by max absolute amplitude without a silence guard),a stable positive sample rate throughout a session,and stream=None or the previous returned buffer. Required torch/torchaudio/transformers packages are declared in the same project directory; torchaudio is needed if resampling differs from the model rate. No project statement was rewritten to add missing guards.\", \"return_shape\": \"The ASR pipeline returns a dictionary with text for a single input; the function returns (accumulated numpy buffer,transcript text). It retranscribes the entire accumulated buffer each update; Gradio streaming capture is not native stateful Whisper decoder input. Different current Transformers VoxtralRealtime model APIs do support native stateful streaming,recorded separately.\"}",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Native versus buffered streaming, transformers",
      "display": "VoxtralRealtime supports stateful incremental model inference; the retained Gradio application uses Whisper and retranscribes its complete accumulated buffer.",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Project function, transformers",
      "display": "def transcribe(stream, new_chunk):\n    sr, y = new_chunk\n\n    # Convert to mono if stereo\n    if y.ndim > 1:\n        y = y.mean(axis=1)\n\n    y = y.astype(np.float32)\n    y /= np.max(np.abs(y))\n\n    if stream is not None:\n        stream = np.concatenate([stream, y])\n    else:\n        stream = y\n    return stream, transcriber({\"sampling_rate\": sr, \"raw\": stream})[\"text\"]  # type: ignore\n",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Project source file, transformers",
      "display": "demo/stream_asr/run.py",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Project full_name, transformers",
      "display": "gradio-app/gradio",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Project stargazers_count, transformers",
      "display": "44.1K",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Library name, faster-whisper",
      "display": "faster-whisper",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Monthly downloads, faster-whisper",
      "display": "19.8M",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "License, faster-whisper",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Package release, faster-whisper",
      "display": "1.2.1",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Package release date, faster-whisper",
      "display": "Oct 2025",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Install, faster-whisper",
      "display": "pip install faster-whisper",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Quickstart, faster-whisper",
      "display": "from faster_whisper import WhisperModel\n\nmodel = WhisperModel(\"tiny\", device=\"cpu\", compute_type=\"int8\")\nsegments, info = model.transcribe(\"audio.mp3\")\nfor segment in segments:\n    print(segment.text)\n",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Repository stars, faster-whisper",
      "display": "26.8K",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Local decoding, faster-whisper",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Stateful streaming, faster-whisper",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Recognition API and model role, faster-whisper",
      "display": "Whisper transcription implemented through CTranslate2,with local converted model caching and configurable compute types.",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Python requirement, faster-whisper",
      "display": ">=3.9",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "First-call prerequisites, faster-whisper",
      "display": "[\"Official CPU/INT8 alternative activated as a disclosed recipe,with supported tiny model alias rather than the README large-v3 GPU default. Local audio.mp3 must exist. Model weights are downloaded/cached on first initialization unless already local; iterate the generator to perform transcription. PyAV bundles FFmpeg libraries,so this normal decode path does not require a system ffmpeg executable.\"]",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Original project API contract, faster-whisper",
      "display": "{\"status\": \"verified\", \"arguments\": \"Whisper-WebUI imports faster_whisper directly. Current1.2.1 exports available_models() with no arguments and WhisperModel with model_size_or_path,device,download_root,compute_type,and local_files_only. Existing get_model_paths/config must supply a valid alias/path or downloaded CTranslate2-format model. The host may snapshot-download a model before construction; that Hugging Face call is not an extra SDK invocation. Device and compute type must be supported by the installed CTranslate2 backend; this function does not guarantee every CUDA setup or arbitrary repository contains converted weights.\", \"return_shape\": \"available_models returns model-name strings used for membership. WhisperModel returns the reusable model stored on self.model; no transcript or measured speed is produced by this model-cache/update function.\"}",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Media decoding and realtime distinction, faster-whisper",
      "display": "PyAV bundles FFmpeg libraries; core file/array transcription yields a lazy segment iterator. Official README points to external Whisper-Streaming for a realtime application policy.",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Project function, faster-whisper",
      "display": "def update_model(self,\n                 model_size: str,\n                 compute_type: str,\n                 progress: gr.Progress = gr.Progress()\n                 ):\n    \"\"\"\n    Update current model setting\n\n    Parameters\n    ----------\n    model_size: str\n        Size of whisper model. If you enter the huggingface repo id, it will try to download the model\n        automatically from huggingface.\n    compute_type: str\n        Compute type for transcription.\n        see more info : https://opennmt.net/CTranslate2/quantization.html\n    progress: gr.Progress\n        Indicator to show progress directly in gradio.\n    \"\"\"\n    progress(0, desc=\"Initializing Model..\")\n\n    model_size_dirname = model_size.replace(\"/\", \"--\") if \"/\" in model_size else model_size\n    if model_size not in self.model_paths and model_size_dirname not in self.model_paths:\n        print(f\"Model is not detected. Trying to download \\\"{model_size}\\\" from huggingface to \"\n              f\"\\\"{os.path.join(self.model_dir, model_size_dirname)} ...\")\n        huggingface_hub.snapshot_download(\n            model_size,\n            local_dir=os.path.join(self.model_dir, model_size_dirname),\n        )\n        self.model_paths = self.get_model_paths()\n        gr.Info(f\"Model is downloaded with the name \\\"{model_size_dirname}\\\"\")\n\n    self.current_model_size = self.model_paths[model_size_dirname]\n\n    local_files_only = False\n    hf_prefix = \"models--Systran--faster-whisper-\"\n    official_model_path = os.path.join(self.model_dir, hf_prefix+model_size)\n    if ((os.path.isdir(self.current_model_size) and os.path.exists(self.current_model_size)) or\n        (model_size in faster_whisper.available_models() and os.path.exists(official_model_path))):\n        local_files_only = True\n\n    self.current_compute_type = compute_type\n    self.model = faster_whisper.WhisperModel(\n        device=self.device,\n        model_size_or_path=self.current_model_size,\n        download_root=self.model_dir,\n        compute_type=self.current_compute_type,\n        local_files_only=local_files_only\n    )\n",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Project source file, faster-whisper",
      "display": "modules/whisper/faster_whisper_inference.py",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Project full_name, faster-whisper",
      "display": "jhj0517/Whisper-WebUI",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Project stargazers_count, faster-whisper",
      "display": "2.9K",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Library name, SpeechRecognition",
      "display": "SpeechRecognition",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Monthly downloads, SpeechRecognition",
      "display": "6.6M",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "License, SpeechRecognition",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Package release, SpeechRecognition",
      "display": "3.17.0",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Package release date, SpeechRecognition",
      "display": "Jun 2026",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Install, SpeechRecognition",
      "display": "pip install SpeechRecognition",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Quickstart, SpeechRecognition",
      "display": "import speech_recognition as sr\n\nr = sr.Recognizer()\naudio = sr.AudioData.from_file(\"audio.wav\")\nprint(r.recognize_google(audio))\n",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Repository stars, SpeechRecognition",
      "display": "9.0K",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Local decoding, SpeechRecognition",
      "display": "Via plugin",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Stateful streaming, SpeechRecognition",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Recognition API and model role, SpeechRecognition",
      "display": "Audio capture and engine/API aggregation,including local optional engines and hosted recognition services.",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Python requirement, SpeechRecognition",
      "display": ">=3.9",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "First-call prerequisites, SpeechRecognition",
      "display": "[\"API recipe from the official file-transcription example,using a caller-supplied local supported audio.wav rather than assuming the repository demo fixture ships in the wheel. Selected Google backend requires internet; its bundled generic key is for testing/personal use as scoped by the SDK documentation. No microphone/PyAudio dependency needed for this file-based first call. No request made here.\"]",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Original project API contract, SpeechRecognition",
      "display": "{\"status\": \"verified\", \"arguments\": \"Original function imports speech_recognition as sr and explicitly type-checks Recognizer and Microphone. Entering the microphone supplies an AudioSource; ambient calibration and listen defaults remain supported in3.17.0. listen(stream=False) returns a complete AudioData phrase. The current public recognize_google alias is assigned to google.recognize_legacy; it accepts that AudioData and defaults to text output. PyAudio/microphone permissions and internet reachability for this selected Google backend are host prerequisites. The function is not an offline transcription example merely because other plugins can run locally.\", \"return_shape\": \"Successful backend text is stored in the original response dictionary. RequestError sets success=False; UnknownValueError keeps the original success flag but sets an error. These are application-defined semantics,not a new SDK return contract. Exception names remain exported through sr; no API request executed.\"}",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Capture versus recognition transport, SpeechRecognition",
      "display": "listen(stream=True) and background capture can provide audio while recording; recognition engine methods accept AudioData. Selected real-project Google recognition requires internet,while local decoders are optional plugins.",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Project function, SpeechRecognition",
      "display": "def recognize_speech_from_mic(recognizer, microphone):\n    \"\"\"Transcribe speech from recorded from `microphone`.\n\n    Returns a dictionary with three keys:\n    \"success\": a boolean indicating whether or not the API request was\n               successful\n    \"error\":   `None` if no error occured, otherwise a string containing\n               an error message if the API could not be reached or\n               speech was unrecognizable\n    \"transcription\": `None` if speech could not be transcribed,\n               otherwise a string containing the transcribed text\n    \"\"\"\n    # check that recognizer and microphone arguments are appropriate type\n    if not isinstance(recognizer, sr.Recognizer):\n        raise TypeError(\"`recognizer` must be `Recognizer` instance\")\n\n    if not isinstance(microphone, sr.Microphone):\n        raise TypeError(\"`microphone` must be `Microphone` instance\")\n\n    # adjust the recognizer sensitivity to ambient noise and record audio\n    # from the microphone\n    with microphone as source:\n        recognizer.adjust_for_ambient_noise(source)\n        audio = recognizer.listen(source)\n\n    # set up the response object\n    response = {\n        \"success\": True,\n        \"error\": None,\n        \"transcription\": None\n    }\n\n    # try recognizing the speech in the recording\n    # if a RequestError or UnknownValueError exception is caught,\n    #     update the response object accordingly\n    try:\n        response[\"transcription\"] = recognizer.recognize_google(audio)\n    except sr.RequestError:\n        # API was unreachable or unresponsive\n        response[\"success\"] = False\n        response[\"error\"] = \"API unavailable\"\n    except sr.UnknownValueError:\n        # speech was unintelligible\n        response[\"error\"] = \"Unable to recognize speech\"\n\n    return response\n",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Project source file, SpeechRecognition",
      "display": "guessing_game.py",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Project full_name, SpeechRecognition",
      "display": "realpython/python-speech-recognition",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Project stargazers_count, SpeechRecognition",
      "display": "250",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Library name, openai-whisper",
      "display": "openai-whisper",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Monthly downloads, openai-whisper",
      "display": "6.3M",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "License, openai-whisper",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Package release, openai-whisper",
      "display": "20250625",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Package release date, openai-whisper",
      "display": "Jun 2025",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Install, openai-whisper",
      "display": "pip install openai-whisper",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Quickstart, openai-whisper",
      "display": "import whisper\n\nmodel = whisper.load_model(\"turbo\")\nresult = model.transcribe(\"audio.mp3\")\nprint(result[\"text\"])\n",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Repository stars, openai-whisper",
      "display": "112.8K",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Local decoding, openai-whisper",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Stateful streaming, openai-whisper",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Recognition API and model role, openai-whisper",
      "display": "Original PyTorch Whisper speech-recognition/model interface with file/array transcription.",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Python requirement, openai-whisper",
      "display": ">=3.8",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "First-call prerequisites, openai-whisper",
      "display": "[\"Official first transcript call. Install the ffmpeg command-line tool separately and provide local audio.mp3. turbo weights download/cache on first load; selected device and available memory must support the model. This snippet transcribes; turbo is not the recommended model for speech translation.\"]",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Original project API contract, openai-whisper",
      "display": "{\"status\": \"verified\", \"arguments\": \"The full application binds WHISPERMODEL via whisper.load_model. Pydub converts uploaded bytes to mono16kHz,16-bit PCM,and numpy converts those samples to normalized float32. Current20250625 transcribe accepts the array by audio keyword and an optional valid language through decode_options. Empty UI language leaves automatic detection enabled; a nonempty language must be supported by the selected model/tokenizer. The two source branches call the same native API; they are treated as one unique call for the bounded task-function exception.\", \"return_shape\": \"transcribe returns a dictionary whose text value is the transcript string. The function returns that text; it does not expose segments,timestamps,or a streaming audio session. Pydub/FFmpeg and the initialized global model remain application prerequisites.\"}",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Audio normalization in the project, openai-whisper",
      "display": "Pydub converts uploaded media to mono16kHz16-bit PCM; numpy scales to float32 before native transcription.",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Project function, openai-whisper",
      "display": "def do_stt(audio, whisper_language):\n    # use pydub to convert sample_rate and sample_width for whisper input\n    dubaudio = AudioSegment.from_file(io.BytesIO(audio))\n    dubaudio = dubaudio.set_channels(1)\n    dubaudio = dubaudio.set_frame_rate(16000)\n    dubaudio = dubaudio.set_sample_width(2)\n\n    # same method to get the array as openai whisper repo used from wav file\n    audio_np = np.frombuffer(dubaudio.raw_data, np.int16).flatten().astype(np.float32) / 32768.0\n\n    if len(whisper_language) == 0:\n        result = WHISPERMODEL.transcribe(audio=audio_np)\n    else:\n        result = WHISPERMODEL.transcribe(audio=audio_np, language=whisper_language)\n    return result[\"text\"]\n",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Project source file, openai-whisper",
      "display": "extensions/whisper_stt/script.py",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Project full_name, openai-whisper",
      "display": "oobabooga/textgen",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Project stargazers_count, openai-whisper",
      "display": "47.7K",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Library name, torchaudio",
      "display": "TorchAudio",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Monthly downloads, torchaudio",
      "display": "5.8M",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "License, torchaudio",
      "display": "BSD-2-Clause",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Package release, torchaudio",
      "display": "2.11.1",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Package release date, torchaudio",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Install, torchaudio",
      "display": "pip install torchaudio",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Quickstart, torchaudio",
      "display": "import torchaudio\n\nbundle = torchaudio.pipelines.WAV2VEC2_ASR_BASE_960H\nmodel = bundle.get_model()\nprint(bundle.get_labels())\n",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Official description, torchaudio",
      "display": "Processes audio in PyTorch.",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Quickstart source file, torchaudio",
      "display": "src/torchaudio/pipelines/_wav2vec2/impl.py",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Repository stars, torchaudio",
      "display": "3.0K",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Local decoding, torchaudio",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Stateful streaming, torchaudio",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Recognition API and model role, torchaudio",
      "display": "Lower-level PyTorch audio/speech models,pretrained bundles,and decoders; examples require explicit feature/tokenizer/checkpoint alignment.",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Python requirement, torchaudio",
      "display": ">=3.10",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "First-call prerequisites, torchaudio",
      "display": "[\"Disclosed native model-loading first-call recipe; it loads the pretrained ASR model and inspects labels,not a claimed transcript from unprovided audio. Selected TorchAudio2.11.1 packaging declares torch>=2.11; choose the appropriate platform/CPU/CUDA distribution. First get_model downloads/caches weights. The source project example separately demonstrates actual RNNT decoding with a trained checkpoint and matching features/tokenizer.\"]",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Streaming model boundary, torchaudio",
      "display": "RNNTBeamSearch.infer exposes streaming state; the chosen RNNT forward example decodes a complete feature sequence. Wav2Vec2 bundle first call only loads model/labels.",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Project function, torchaudio",
      "display": "def forward(self, x, transcript=True):\n    if len(x) != 1:\n        raise NotImplementedError(\"batch size should be 1\")\n    if self.bundle.sample_rate != self.source_sample_rate:\n        x = torchaudio.functional.resample(\n            x, self.source_sample_rate, self.bundle.sample_rate\n        )\n\n    emissions, _ = self.model(x)\n    if transcript:\n        return self.decoder(emissions)\n    else:\n        return emissions\n",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Project source file, torchaudio",
      "display": "armory/baseline_models/pytorch/hubert_asr_large.py",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Project full_name, torchaudio",
      "display": "twosixlabs/armory",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Project stargazers_count, torchaudio",
      "display": "194",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Library name, sherpa-onnx",
      "display": "sherpa-onnx",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Monthly downloads, sherpa-onnx",
      "display": "4.2M",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "License, sherpa-onnx",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Package release, sherpa-onnx",
      "display": "2.0.1",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Package release date, sherpa-onnx",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Install, sherpa-onnx",
      "display": "pip install sherpa-onnx numpy",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Quickstart, sherpa-onnx",
      "display": "import wave\nimport numpy as np\nimport sherpa_onnx\n\nrecognizer = sherpa_onnx.OfflineRecognizer.from_nemo_ctc(\n    model=\"model.onnx\", tokens=\"tokens.txt\"\n)\nwith wave.open(\"speech.wav\", \"rb\") as wav:\n    assert wav.getnchannels() == 1 and wav.getsampwidth() == 2\n    samples = np.frombuffer(wav.readframes(wav.getnframes()), dtype=np.int16).astype(np.float32) / 32768\n    sample_rate = wav.getframerate()\nstream = recognizer.create_stream()\nstream.accept_waveform(sample_rate, samples)\nrecognizer.decode_stream(stream)\nprint(stream.result.text)\n",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Official description, sherpa-onnx",
      "display": "Recognizes speech.",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Quickstart source file, sherpa-onnx",
      "display": "python-api-examples/offline-decode-files.py",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Repository stars, sherpa-onnx",
      "display": "16.0K",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Local decoding, sherpa-onnx",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Stateful streaming, sherpa-onnx",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Recognition API and model role, sherpa-onnx",
      "display": "Local ONNX speech toolkit with distinct online streaming and offline model-family factories.",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Python requirement, sherpa-onnx",
      "display": ">=3.7",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "First-call prerequisites, sherpa-onnx",
      "display": "[\"Single-file API recipe from the official model-family factory and PCM reader. Provide a compatible exported NeMo CTC model.onnx,tokens.txt,and a nonempty mono16-bit PCM speech.wav at the model-supported sample rate (use16kHz for the documented English Citrinet model). These model assets are not installed by pip; the official model catalog supplies matching bundles. CPU defaults used; no model download or decoding executed.\"]",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Offline model-family dispatch, sherpa-onnx",
      "display": "[\"transducer\", \"Paraformer\", \"NeMo CTC\", \"WeNet CTC\", \"Whisper\", \"TDNN CTC\"]",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Library name, speechbrain",
      "display": "SpeechBrain",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Monthly downloads, speechbrain",
      "display": "1.6M",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "License, speechbrain",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Package release, speechbrain",
      "display": "1.1.2",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Package release date, speechbrain",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Install, speechbrain",
      "display": "pip install speechbrain",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Quickstart, speechbrain",
      "display": "from speechbrain.inference import EncoderDecoderASR\n\nasr_model = EncoderDecoderASR.from_hparams(source=\"speechbrain/asr-conformer-transformerlm-librispeech\", savedir=\"pretrained_models/asr-transformer-transformerlm-librispeech\")\nasr_model.transcribe_file(\"speechbrain/asr-conformer-transformerlm-librispeech/example.wav\")\n",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Official description, speechbrain",
      "display": "Provides an all-in-one speech toolkit in Python and PyTorch.",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Quickstart source file, speechbrain",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Repository stars, speechbrain",
      "display": "11.9K",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Local decoding, speechbrain",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Stateful streaming, speechbrain",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Recognition API and model role, speechbrain",
      "display": "PyTorch speech toolkit spanning pretrained inference and custom ASR training/validation.",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "Python requirement, speechbrain",
      "display": ">=3.8.1",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "First-call prerequisites, speechbrain",
      "display": "[\"Official first pretrained-file transcription. Hugging Face model assets and its example.wav are fetched/cached if absent; internet and writable cache required on first use. The current1.1.2 Pretrained loader accepts local paths,web URLs,and Hugging Face repository file paths. Its current audio_io compatibility layer uses soundfile rather than assuming removed TorchAudio I/O backends.\"]",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Current audio loader and training scope, speechbrain",
      "display": "SpeechBrain1.1.2 uses a soundfile-based audio_io compatibility layer. The retained example trains a tiny seq2seq ASR integration fixture; its overfitting assertion is not production quality evidence.",
      "asOf": "2026-11-20"
    },
    "F256": {
      "label": "Project function, speechbrain",
      "display": "def transcribe_batch_with_details(self, wavs, wav_lens):\n    \"\"\"Transcribes the input audio into a sequence of words\n\n    The waveforms should already be in the model's desired format.\n    You can call:\n    ``normalized = EncoderDecoderASR.normalizer(signal, sample_rate)``\n    to get a correctly converted signal in most cases.\n\n    Arguments\n    ---------\n    predicted_words : list\n        The raw ASR predictions, fully decoded\n    best_scores : list\n        The best scores (from beam search)\n    best_log_probs : list\n        The best predicted log-probabilities (from beam search)\n\n\n    Returns\n    -------\n    predicted_words : list\n        The predictions\n\n    best_scores : torch.Tensor\n        The best scores (from beam search)\n\n    best_log_probs : torch.Tensor\n        The best log-probabilities\n\n    \"\"\"\n    with torch.no_grad():\n        wav_lens = wav_lens.to(self.device)\n        encoder_out = self.asr.encode_batch(wavs, wav_lens)\n        (\n            hyps,\n            best_lens,\n            best_scores,\n            best_log_probs,\n        ) = self.asr.mods.decoder(encoder_out, wav_lens)\n        predicted_words = [\n            self.asr.tokenizer.decode_ids(token_seq) for token_seq in hyps\n        ]\n    return predicted_words, best_scores, best_log_probs\n",
      "asOf": "2026-11-20"
    },
    "F257": {
      "label": "Project source file, speechbrain",
      "display": "benchmarks/DASB/utils/eval.py",
      "asOf": "2026-11-20"
    },
    "F258": {
      "label": "Project full_name, speechbrain",
      "display": "speechbrain/benchmarks",
      "asOf": "2026-11-20"
    },
    "F259": {
      "label": "Project stargazers_count, speechbrain",
      "display": "145",
      "asOf": "2026-11-20"
    },
    "F260": {
      "label": "Library name, vosk",
      "display": "Vosk",
      "asOf": "2026-11-20"
    },
    "F261": {
      "label": "Monthly downloads, vosk",
      "display": "1.3M",
      "asOf": "2026-11-20"
    },
    "F262": {
      "label": "License, vosk",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F263": {
      "label": "Package release, vosk",
      "display": "0.3.45",
      "asOf": "2026-11-20"
    },
    "F264": {
      "label": "Package release date, vosk",
      "display": "Dec 2022",
      "asOf": "2026-11-20"
    },
    "F265": {
      "label": "Install, vosk",
      "display": "pip install vosk",
      "asOf": "2026-11-20"
    },
    "F266": {
      "label": "Quickstart, vosk",
      "display": "import wave\nfrom vosk import Model, KaldiRecognizer\n\nmodel = Model(lang=\"en-us\")\nwith wave.open(\"speech.wav\", \"rb\") as wav:\n    assert wav.getnchannels() == 1 and wav.getsampwidth() == 2\n    recognizer = KaldiRecognizer(model, wav.getframerate())\n    recognizer.AcceptWaveform(wav.readframes(wav.getnframes()))\nprint(recognizer.FinalResult())\n",
      "asOf": "2026-11-20"
    },
    "F267": {
      "label": "Repository stars, vosk",
      "display": "15.3K",
      "asOf": "2026-11-20"
    },
    "F268": {
      "label": "Local decoding, vosk",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F269": {
      "label": "Stateful streaming, vosk",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F270": {
      "label": "Recognition API and model role, vosk",
      "display": "Offline Kaldi-based recognition with incremental PCM input and JSON results.",
      "asOf": "2026-11-20"
    },
    "F271": {
      "label": "Python requirement, vosk",
      "display": ">=3",
      "asOf": "2026-11-20"
    },
    "F272": {
      "label": "First-call prerequisites, vosk",
      "display": "[\"Disclosed minimal whole-file PCM recipe from the official streaming example. Provide a nonempty mono16-bit PCM speech.wav and a matching Vosk language/model. Model(lang=\\\"en-us\\\") can automatically fetch model assets if uncached; recognition then runs locally. Output is a JSON string,not a direct Python text object. No ASR server or network connection is started by this script.\"]",
      "asOf": "2026-11-20"
    },
    "F273": {
      "label": "Original project API contract, vosk",
      "display": "{\"status\": \"verified\", \"arguments\": \"The actual websocket handler constructs rec=KaldiRecognizer(model,sample_rate[,grammar]) and passes it into this whole task helper. Audio messages are raw PCM bytes matching recognizer sample rate; the two exact text control strings are handled before native audio input. Current0.3.45 AcceptWaveform accepts bytes and returns an endpoint/completion boolean. Results and partial/final results remain UTF-8 JSON strings. Model assets and websocket framing/session setup are host prerequisites; the helper alone is not an entire server.\", \"return_shape\": \"Returns (JSON string,stop flag). EOF finalizes and requests stop; the literal reset command finalizes with stop=False but does not invoke native Reset. True from AcceptWaveform chooses Result; otherwise PartialResult. The JSON is forwarded unchanged by the host,not parsed into a fabricated Python transcript field.\"}",
      "asOf": "2026-11-20"
    },
    "F274": {
      "label": "Incremental result protocol, vosk",
      "display": "AcceptWaveform consumes PCM chunks; Result,PartialResult,and FinalResult return JSON strings. The application helper returns a stop flag separately.",
      "asOf": "2026-11-20"
    },
    "F275": {
      "label": "Project function, vosk",
      "display": "def process_chunk(rec, message):\n    if message == '{\"eof\" : 1}':\n        return rec.FinalResult(), True\n    if message == '{\"reset\" : 1}':\n        return rec.FinalResult(), False\n    elif rec.AcceptWaveform(message):\n        return rec.Result(), False\n    else:\n        return rec.PartialResult(), False\n",
      "asOf": "2026-11-20"
    },
    "F276": {
      "label": "Project source file, vosk",
      "display": "websocket/asr_server.py",
      "asOf": "2026-11-20"
    },
    "F277": {
      "label": "Project full_name, vosk",
      "display": "alphacep/vosk-server",
      "asOf": "2026-11-20"
    },
    "F278": {
      "label": "Project stargazers_count, vosk",
      "display": "1.3K",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python speech recognition libraries SpeechRecognition Vosk faster-whisper Whisper code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
