![]() If you have used the C++ SDK asynchronous APIs before, then you might notice the new pattern introduced with the Amazon Transcribe Streaming API. PortAudio is responsible for the audio capturing thread, and the SDK is responsible for the API communication thread. The SDK and PortAudio create and manage the threads. To do those two operations concurrently, the application uses multiple threads. Second, you want to simultaneously consume that stream and send the bits you captured to the service. Now, you’re ready to write the command line application.īefore diving into the code, I’d like to explain a few things about the structure of the application.įirst, you need to tell PortAudio to capture audio from the microphone and write the sampled bits to a stream. DBUILD_ONLY=”transcribestreaming” -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF But I show you how to build the SDK from source. ![]() You can use vcpkg or Homebrew to do that step. The next step is to download and install the Amazon Transcribe Streaming C++ SDK. $ cd portaudioįor this demonstration, you can safely ignore any warnings you see while PortAudio builds. If you’re running on Linux or macOS, run the following commands instead. You need both files for the subsequent steps.Ĥ. In the Release directory, copy the file named portaudio_static_圆4.lib and the file named portaudio.h to another temporary directory. PortAudio does not define an install target when building on Windows. Those commands should build both a DLL and a static library. If you’re running Windows, run the following commands to build and install the library.Unzip the archive to a PortAudio directory.Browse to and download the latest stable release.If you’re using Linux or macOS, you can use the system’s package manager to install the library (for example: apt, yum, or Homebrew). The first step is to download and install PortAudio from the source. On Windows, you must be running Windows 10.You should see HTTP2 listed as one of the features.To ensure that the version of libcurl you have supports HTTP/2, run the following command: On *nix, you must have libcurl with HTTP/2 support installed on the system.A modern C++ compiler that supports C++11, a minimum of GCC 5.0, Clang 4.0, or Visual Studio 2015.CMake (preferably a recent version 3.11 or later).You must have the following tools installed to build the application: Note: Amazon Transcribe streaming transcription has a separate API from Amazon Transcribe, which also allows you to do speech-to-text, albeit not in real time. PortAudio is a free, cross-platform library, so you should be able to build this on Windows, macOS, and Linux. ![]() You use PortAudio (a third-party library) to capture and sample audio. In this walkthrough, you build a command line application that captures audio from the computer’s microphone, sends it to Amazon Transcribe streaming, and prints out transcribed text as you speak. Streaming transcription uses HTTP/2 technology to communicate efficiently with clients. This service allows you to do speech-to-text processing in real time. Today, I’d like to walk you through how to use the AWS C++ SDK to leverage Amazon Transcribe streaming transcription.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |