Blockchain

AssemblyAI Introduces C#. WEB SDK for Advanced Audio Transcription as well as Study #.\n\nLuisa Crawford.\nSep 03, 2024 05:37.\n\nAssemblyAI discharges a C#. WEB SDK, allowing creators to translate and also analyze audio, and also apply LLMs utilizing LeMUR.\n\n\n\n\nAssemblyAI has declared the release of its own brand new C#. WEB SDK, created to promote audio transcription and also evaluation for developers utilizing.NET foreign languages like C#, VB.NET, and also F#. The SDK strives to streamline the use of AssemblyAI's advanced Pep talk AI styles, depending on to AssemblyAI.\nSecret Components as well as Targets.\nThe SDK has been actually developed along with many crucial purposes in mind:.\n\nDeliver an instinctive interface for all AssemblyAI models and features utilizing idiomatic C

.Guarantee being compatible with several platforms, including.NET 6.0,. Web Platform 4.6.2, and.NET Specification 2.0 as well as above.Reduce addictions to stop version disputes as well as the demand for tiing redirects.Recording Sound Files.One of the major performances of the SDK is actually audio transcription. Developers can transcribe audio documents asynchronously or in real-time. Below is actually an example of just how to transcribe an audio documents:.using AssemblyAI.utilizing AssemblyAI.Transcripts.var customer = brand new AssemblyAIClient(" YOUR_API_KEY").var records = await client.Transcripts.TranscribeAsync( brand new TranscriptParams.AudioUrl="https://storage.googleapis.com/aai-docs-samples/nbc.mp3". ).transcript.EnsureStatusCompleted().Console.WriteLine( transcript.Text).For local area files, comparable code may be made use of to accomplish transcription.await utilizing var stream = new FileStream("./ nbc.mp3", FileMode.Open).var records = await client.Transcripts.TranscribeAsync(.flow,.new TranscriptOptionalParams.LanguageCode = TranscriptLanguageCode.EnUs.).transcript.EnsureStatusCompleted().Console.WriteLine( transcript.Text).Real-Time Sound Transcription.The SDK additionally reinforces real-time audio transcription making use of Streaming Speech-to-Text. This function is particularly practical for requests requiring urgent handling of audio records.making use of AssemblyAI.Realtime.wait for using var transcriber = new RealtimeTranscriber( brand-new RealtimeTranscriberOptions.ApiKey="YOUR_API_KEY",.SampleRate = 16_000. ).transcriber.PartialTranscriptReceived.Subscribe( transcript =&gtConsole.WriteLine($" Partial: transcript.Text "). ).transcriber.FinalTranscriptReceived.Subscribe( records =&gtConsole.WriteLine($" Final: transcript.Text "). ).await transcriber.ConnectAsync().// Pseudocode for acquiring sound from a mic as an example.GetAudio( async (chunk) =&gt await transcriber.SendAudioAsync( part)).await transcriber.CloseAsync().Taking Advantage Of LeMUR for LLM Apps.The SDK integrates with LeMUR to permit designers to build big language model (LLM) applications on voice data. Right here is actually an example:.var lemurTaskParams = new LemurTaskParams.Urge="Give a short summary of the transcript.",.TranscriptIds = [transcript.Id],.FinalModel = LemurModel.AnthropicClaude3 _ 5_Sonnet..var reaction = wait for client.Lemur.TaskAsync( lemurTaskParams).Console.WriteLine( response.Response).Sound Knowledge Models.In addition, the SDK comes with integrated support for audio knowledge versions, enabling sentiment analysis as well as other enhanced functions.var records = await client.Transcripts.TranscribeAsync( new TranscriptParams.AudioUrl="https://storage.googleapis.com/aai-docs-samples/nbc.mp3",.SentimentAnalysis = correct. ).foreach (var cause transcript.SentimentAnalysisResults!).Console.WriteLine( result.Text).Console.WriteLine( result.Sentiment)// BENEFICIAL, NEUTRAL, or downside.Console.WriteLine( result.Confidence).Console.WriteLine($" Timestamp: result.Start - result.End ").To learn more, go to the main AssemblyAI blog.Image source: Shutterstock.