Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 16, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 16, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 16, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 16, 2025

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025

      Minecraft licensing robbed us of this controversial NFL schedule release video

      May 16, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      The power of generators

      May 16, 2025
      Recent

      The power of generators

      May 16, 2025

      Simplify Factory Associations with Laravel’s UseFactory Attribute

      May 16, 2025

      This Week in Laravel: React Native, PhpStorm Junie, and more

      May 16, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025
      Recent

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Artificial Intelligence»Introducing the AssemblyAI integration for LangChain Go

    Introducing the AssemblyAI integration for LangChain Go

    April 10, 2024

    LangChain is a framework for developing applications using Large Language Models (LLMs). LangChain provides common building blocks for building integrations with LLMs.

    However, LLMs only operate on textual data and don’t understand audio data. With our recent contribution to LangChain Go, you can now integrate AssemblyAI’s industry-leading speech-to-text models using the new document loader.

    💡
    The AssemblyAI document loader is also available for both LangChain (Python) and LangChain.js (JavaScript).

    The following example answers a question about an audio file. The example uses AssemblyAI to transcribe the audio and OpenAI to generate a response to the question.

    package main

    import (
    “context”
    “fmt”
    “os”

    “github.com/AssemblyAI/assemblyai-go-sdk”
    “github.com/tmc/langchaingo/chains”
    “github.com/tmc/langchaingo/documentloaders”
    “github.com/tmc/langchaingo/llms/openai”
    )

    func main() {
    apiKey := os.Getenv(“ASSEMBLYAI_API_KEY”)
    llm, _ := openai.New()

    chain := chains.LoadStuffQA(llm)

    loader := documentloaders.NewAssemblyAIAudioTranscript(
    apiKey,
    documentloaders.WithAudioURL(“https://storage.googleapis.com/aai-docs-samples/sports_injuries.mp3”),
    documentloaders.WithTranscriptParams(&assemblyai.TranscriptOptionalParams{
    LanguageCode: “en_us”,
    }),
    )

    ctx := context.Background()

    docs, _ := loader.Load(ctx)

    answer, _ := chains.Call(ctx, chain, map[string]any{
    “input_documents”: docs,
    “question”: “What is a runner’s knee?”,
    })

    fmt.Println(answer[“text”])
    }

    When you run the example, you’ll get an output similar to the following:

    Runner’s knee is a condition characterized by pain behind or around the kneecap, caused by overuse, muscle imbalance, and inadequate stretching. Symptoms include pain under or around the kneecap and pain when walking.

    Leverage LLMs for audio data using LeMUR

    To learn more ways you can chain the audio transcript loader, see the LangChain Go documentation.

    If you’re not already using LangChain Go, or if you’re applying LLMs primarily to audio data, we encourage you to try LeMUR, a framework for leveraging LLMs to understand speech.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleHands-on Review: Cynomi AI-powered vCISO Platform
    Next Article Prediction AI Is Coming: Are You (and the World) Ready?

    Related Posts

    Security

    Nmap 7.96 Launches with Lightning-Fast DNS and 612 Scripts

    May 17, 2025
    Common Vulnerabilities and Exposures (CVEs)

    CVE-2024-47893 – VMware GPU Firmware Memory Disclosure

    May 17, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Create Custom Tattoo Designs – ArtiTattoos

    Development

    I’m a pro Linux user, and this distribution is one of the most unique I’ve tried

    Development

    PostgreSQL Vulnerability Exploited Alongside BeyondTrust Zero-Day in Targeted Attacks

    Development

    If you’re a Genshin Impact fan, these exclusive Ugreen charging accessories are a must

    Operating Systems
    GetResponse

    Highlights

    Oracle expands AI capabilities with powerful new Agent Studio tool

    March 20, 2025

    Oracle is betting big on AI with its latest innovation. AI Agent Studio empowers companies…

    Syngenta develops a generative AI assistant to support sales representatives using Amazon Bedrock Agents

    December 7, 2024

    Fix: USP10.DLL is Not Designed to Run on Windows

    January 28, 2025

    Skywings Marketing – Top Digital Marketing Agency in Vaishali for Smart Business Solutions

    April 21, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.