{"id":13560334,"url":"https://github.com/AssemblyAI/assemblyai-semantic-kernel","last_synced_at":"2025-04-03T15:32:03.790Z","repository":{"id":195975794,"uuid":"693293063","full_name":"AssemblyAI/assemblyai-semantic-kernel","owner":"AssemblyAI","description":"Transcribe audio using AssemblyAI with Semantic Kernel plugins.","archived":false,"fork":false,"pushed_at":"2024-02-19T21:52:59.000Z","size":113,"stargazers_count":5,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-02T01:47:29.450Z","etag":null,"topics":["ai","assemblyai","llm","semantic-kernel","transcribe"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AssemblyAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-18T18:28:02.000Z","updated_at":"2024-08-14T18:40:31.809Z","dependencies_parsed_at":"2024-01-04T00:50:02.360Z","dependency_job_id":"4e6d6732-2bfb-45df-8fae-6d33bcac31c2","html_url":"https://github.com/AssemblyAI/assemblyai-semantic-kernel","commit_stats":null,"previous_names":["assemblyai/assemblyai-semantic-kernel"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AssemblyAI%2Fassemblyai-semantic-kernel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AssemblyAI%2Fassemblyai-semantic-kernel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AssemblyAI%2Fassemblyai-semantic-kernel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AssemblyAI%2Fassemblyai-semantic-kernel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AssemblyAI","download_url":"https://codeload.github.com/AssemblyAI/assemblyai-semantic-kernel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247028087,"owners_count":20871646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","assemblyai","llm","semantic-kernel","transcribe"],"created_at":"2024-08-01T13:00:42.020Z","updated_at":"2025-04-03T15:31:58.780Z","avatar_url":"https://github.com/AssemblyAI.png","language":"C#","readme":"\u003cimg src=\"https://github.com/AssemblyAI/assemblyai-python-sdk/blob/master/assemblyai.png?raw=true\" width=\"500\" alt=\"AssemblyAI logo\"/\u003e\n\n---\n\n[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/AssemblyAI.SemanticKernel)](https://www.nuget.org/packages/AssemblyAI.SemanticKernel/)\n[![CI Build](https://github.com/AssemblyAI/assemblyai-semantic-kernel/actions/workflows/ci.yml/badge.svg)](https://github.com/AssemblyAI/assemblyai-semantic-kernel/actions/workflows/ci.yml)\n[![GitHub License](https://img.shields.io/github/license/AssemblyAI/assemblyai-semantic-kernel \"GitHub License\")](https://github.com/AssemblyAI/assemblyai-semantic-kernel/blob/main/LICENSE)\n[![AssemblyAI Twitter](https://img.shields.io/twitter/follow/AssemblyAI?label=%40AssemblyAI\u0026style=social)](https://twitter.com/AssemblyAI)\n[![AssemblyAI YouTube](https://img.shields.io/youtube/channel/subscribers/UCtatfZMf-8EkIwASXM4ts0A)](https://www.youtube.com/@AssemblyAI)\n[![Discord](https://img.shields.io/discord/875120158014853141?logo=discord\u0026label=Discord\u0026link=https%3A%2F%2Fdiscord.com%2Fchannels%2F875120158014853141\u0026style=social)\n](https://discord.gg/5aQNZyq3)\n\n# AssemblyAI integration for Semantic Kernel\n\nTranscribe audio using AssemblyAI with Semantic Kernel plugins.\n\n## Get started\n\nAdd the [AssemblyAI.SemanticKernel NuGet package](https://www.nuget.org/packages/AssemblyAI.SemanticKernel) to your project.\n\n```bash\ndotnet add package AssemblyAI.SemanticKernel\n```\n\nNext, register the `AssemblyAI` plugin into your kernel:\n\n```csharp\nusing AssemblyAI.SemanticKernel;\nusing Microsoft.SemanticKernel;\n\n// Build your kernel\nvar kernelBuilder = Kernel.CreateBuilder();\n\n// add services like LLMs etc.\n\n// Get AssemblyAI API key from env variables, or much better, from .NET configuration\nstring apiKey = Environment.GetEnvironmentVariable(\"ASSEMBLYAI_API_KEY\")\n  ?? throw new Exception(\"ASSEMBLYAI_API_KEY env variable not configured.\");\nkernelBuilder.AddAssemblyAIPlugin(new AssemblyAIPluginOptions\n    {\n        ApiKey = apiKey,\n        PluginName = null,\n        AllowFileSystemAccess = false\n    });\n\nvar kernel = kernelBuilder.Build();\n```\n\nYou can configure three options:\n- ApiKey: Configure the AssemblyAI API key\n- PluginName: Configure the name of the plugin inside of Semantic Kernel. Defaults to `\"AssemblyAIPlugin\"`.\n- AllowFileSystemAccess: Allow the plugin to read files from the file system to upload audio files for transcriptions. Defaults to `false`.\n\n`kernelBuilder.AddAssemblyAIPlugin` has overloads to configure the plugin using configuration and through a lambda.\n\n## Usage\n\nGet the `Transcribe` function from the transcript plugin and invoke it with the context variables.\n```csharp\nvar result = await kernel.InvokeAsync\u003cstring\u003e(\n    nameof(AssemblyAIPlugin),\n    AssemblyAIPlugin.TranscribeFunctionName,\n    new KernelArguments\n    {\n        [\"INPUT\"] = \"https://storage.googleapis.com/aai-docs-samples/espn.m4a\"\n    }\n);\nConsole.WriteLine(result);\n```\n\nYou can also upload local audio and video file. To do this:\n- Set the `AssemblyAIPluginOptions.AllowFileSystemAccess` to `true`.\n- Configure the `INPUT` variable with a local file path.\n\n```csharp\nkernelBuilder.AddAssemblyAIPlugin(new AssemblyAIPluginOptions\n    {\n        ApiKey = apiKey,\n        AllowFileSystemAccess = true\n    });\n\n...\n\nvar result = await kernel.InvokeAsync\u003cstring\u003e(\n    nameof(AssemblyAIPlugin), \n    AssemblyAIPlugin.TranscribeFunctionName, \n    new KernelArguments\n    {\n        [\"INPUT\"] = \"./espn.m4a\"\n    }\n);\nConsole.WriteLine(result);\n```\n\nYou can also invoke the function from within a semantic function like this.\n\n```csharp\nconst string prompt = \"\"\"\n                      Here is a transcript:\n                      {{AssemblyAIPlugin.Transcribe \"https://storage.googleapis.com/aai-docs-samples/espn.m4a\"}}\n                      ---\n                      Summarize the transcript.\n                      \"\"\";\nvar result = await kernel.InvokePromptAsync\u003cstring\u003e(prompt);\nConsole.WriteLine(result);\n```\n\nAll the code above explicitly invokes the transcript plugin, but it can also be invoked as part of a plan. \nCheck out [the Sample project](./src/Sample/Program.cs#L78)) which uses a plan to transcribe an audio file in addition to explicit invocation.\n\n## Notes\n\n- The AssemblyAI integration only supports Semantic Kernel with .NET at this moment. \nIf there's demand, we will extend support to other platforms, so let us know!\n- Feel free to [file an issue](https://github.com/AssemblyAI/assemblyai-semantic-kernel/issues) in case of bugs or feature requests.\n","funding_links":[],"categories":["Plugins"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAssemblyAI%2Fassemblyai-semantic-kernel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAssemblyAI%2Fassemblyai-semantic-kernel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAssemblyAI%2Fassemblyai-semantic-kernel/lists"}