### Install Dependencies and Run Example Source: https://github.com/deepgram/recipes/blob/main/recipes/javascript/speech-to-text/v1/keyterm/README.md Install project dependencies using npm and then execute the example script. ```bash npm install node example.js ``` -------------------------------- ### Run Intent Recognition Example Source: https://github.com/deepgram/recipes/blob/main/recipes/go/audio-intelligence/v1/intents/README.md Execute the Go example to demonstrate intent recognition. Ensure the DEEPGRAM_API_KEY environment variable is set and dependencies are installed. ```bash go run example.go ``` -------------------------------- ### Fetch Specific SDK Example File Source: https://github.com/deepgram/recipes/blob/main/instructions/generate-examples.md Retrieves the content of a specific example file from an SDK's examples directory. This helps in understanding the correct import paths and client initialization patterns. ```bash gh api "repos/{repo}/contents/examples/{filename}" --jq '.content' | base64 -d ``` -------------------------------- ### Example Output with Numerals Source: https://github.com/deepgram/recipes/blob/main/recipes/go/speech-to-text/v1/numerals/README.md Shows the transcript output when the numerals feature is enabled. No specific setup is required beyond enabling the parameter. ```text Transcript (with numerals): That's 1 small step for man, 1 giant leap for mankind. ``` -------------------------------- ### Run Java TTS Encoding Example Source: https://github.com/deepgram/recipes/blob/main/recipes/java/text-to-speech/v1/select-encoding/README.md Commands to navigate to the project directory and execute the Java example using Maven. ```bash cd recipes/java/text-to-speech/v1/select-encoding mvn exec:java -Dexec.mainClass="Example" ``` -------------------------------- ### Run Java Text-to-Speech Example Source: https://github.com/deepgram/recipes/blob/main/recipes/java/text-to-speech/v1/select-model/README.md Execute the Java example to demonstrate text-to-speech functionality with model selection. Ensure prerequisites are met before running. ```bash cd recipes/java/text-to-speech/v1/select-model mvn exec:java -Dexec.mainClass="Example" ``` -------------------------------- ### Run Sentiment Analysis Example Source: https://github.com/deepgram/recipes/blob/main/recipes/javascript/audio-intelligence/v1/sentiment/README.md Execute the sentiment analysis script using Node.js after setting the API key and installing dependencies. ```bash node example.js ``` -------------------------------- ### Check SDK Examples Directory Source: https://github.com/deepgram/recipes/blob/main/instructions/generate-examples.md Checks if an 'examples' directory exists within the SDK repository and lists the names of files or directories within it. ```bash gh api "repos/{repo}/contents/examples" 2>/dev/null | jq -r '.[].name' ``` -------------------------------- ### Run Voice Agent Example Source: https://github.com/deepgram/recipes/blob/main/recipes/java/voice-agents/v1/connect/README.md Executes the Java voice agent example using Maven. ```bash cd recipes/java/voice-agents/v1/connect mvn exec:java -Dexec.mainClass="Example" ``` -------------------------------- ### Run WebSocket TTS Example Source: https://github.com/deepgram/recipes/blob/main/recipes/java/text-to-speech/v1/websocket-streaming/README.md Commands to navigate to the project directory and execute the Java WebSocket TTS example. ```bash cd recipes/java/text-to-speech/v1/websocket-streaming mvn exec:java -Dexec.mainClass="Example" ``` -------------------------------- ### Run Entity Detection Example Source: https://github.com/deepgram/recipes/blob/main/recipes/java/audio-intelligence/v1/entities/README.md Execute the Java example for entity detection. Ensure you have Java 11+ and Maven 3.9+ installed, and the DEEPGRAM_API_KEY environment variable is set. ```bash cd recipes/java/audio-intelligence/v1/entities mvn exec:java -Dexec.mainClass="Example" ``` -------------------------------- ### Run the example Source: https://github.com/deepgram/recipes/blob/main/recipes/python/text-to-speech/v1/generate-audio/README.md Command to execute the Python script and generate the audio file. ```bash python example.py # Produces output.mp3 ``` -------------------------------- ### Run Voice Agent with Function Calling Source: https://github.com/deepgram/recipes/blob/main/recipes/java/voice-agents/v1/function-calling/README.md Navigate to the recipe directory and execute the Java example using Maven. Ensure you have Java 11+ and Maven 3.9+ installed, and the DEEPGRAM_API_KEY environment variable is set. ```bash cd recipes/java/voice-agents/v1/function-calling mvn exec:java -Dexec.mainClass="Example" ``` -------------------------------- ### Find Existing Example Files (Java) Source: https://github.com/deepgram/recipes/blob/main/instructions/pm.md Specifically searches for Java recipes by looking for `src/main/java/Example.java` files within the recipe directory. This complements the standard example file search. ```bash find "recipes/java/" -path "*/src/main/java/Example.java" 2>/dev/null | \ sed "s|recipes/java/||" | sed "s|/src/main/java/Example\.java||" | sort ``` -------------------------------- ### Run Java Streaming File Example Source: https://github.com/deepgram/recipes/blob/main/recipes/java/speech-to-text/v1/streaming-file/README.md Navigate to the example directory and run the Java code using Maven. Ensure the DEEPGRAM_API_KEY environment variable is set. ```bash cd recipes/java/speech-to-text/v1/streaming-file mvn exec:java -Dexec.mainClass="Example" ``` -------------------------------- ### Intent Recognition Output Example Source: https://github.com/deepgram/recipes/blob/main/recipes/cli/text-analysis/v1/intents/README.md Example of the console output generated when running intent recognition. ```text Intents: - Cancel subscription (0.92) - Request refund (0.88) ``` -------------------------------- ### Find Existing Example Files (Standard Languages) Source: https://github.com/deepgram/recipes/blob/main/instructions/pm.md Searches for existing example files within a language's recipe directory. It excludes test files and module definition files. The output is a list of relative recipe paths. ```bash find "recipes/{slug}/" -name "example.*" ! -name "*_test*" ! -name "*.mod" 2>/dev/null | \ sed "s|recipes/{slug}/||" | sed "s|/example.*||" | sort ``` -------------------------------- ### Run Audio Summarization Example Source: https://github.com/deepgram/recipes/blob/main/recipes/java/audio-intelligence/v1/summarize/README.md Execute the Java example to generate an audio summary. Ensure you have Java 11+, Maven 3.9+, and your DEEPGRAM_API_KEY environment variable set. ```bash cd recipes/java/audio-intelligence/v1/summarize mvn exec:java -Dexec.mainClass="Example" ``` -------------------------------- ### Run Text-to-Speech v1 Example Source: https://github.com/deepgram/recipes/blob/main/recipes/java/text-to-speech/v1/generate-audio/README.md Execute the Java example to convert text to speech and save it to a file. Ensure prerequisites are met, including setting the DEEPGRAM_API_KEY environment variable. ```bash cd recipes/java/text-to-speech/v1/generate-audio mvn exec:java -Dexec.mainClass="Example" ``` -------------------------------- ### Find Existing Example Files (Rust) Source: https://github.com/deepgram/recipes/blob/main/instructions/pm.md Specifically searches for Rust recipes by looking for `src/main.rs` files within the recipe directory. This complements the standard example file search. ```bash find "recipes/rust/" -path "*/src/main.rs" 2>/dev/null | \ sed "s|recipes/rust/||" | sed "s|/src/main\.rs||" | sort ``` -------------------------------- ### Entity Detection Output Example Source: https://github.com/deepgram/recipes/blob/main/recipes/java/audio-intelligence/v1/entities/README.md This is an example of the expected output when entity detection is successfully run. It displays detected entities with their type labels and confidence percentages. ```text PERSON: Neil Armstrong (95%) ORGANIZATION: NASA (88%) LOCATION: Moon (92%) MISSION: Apollo 11 (85%) ``` -------------------------------- ### Run Diarization Example in Java Source: https://github.com/deepgram/recipes/blob/main/recipes/java/speech-to-text/v1/diarize/README.md Execute the Java example using Maven to perform speaker diarization on an audio file. Ensure the DEEPGRAM_API_KEY environment variable is set. ```bash mvn exec:java -Dexec.mainClass=Example ``` -------------------------------- ### Example Output Source: https://github.com/deepgram/recipes/blob/main/recipes/java/speech-to-text/v1/summarize/README.md The expected format of the generated summary text. ```text Summary: NASA astronauts conducted a spacewalk outside the International Space Station to perform maintenance and upgrades on critical systems. ``` -------------------------------- ### Example Content Search Output Source: https://github.com/deepgram/recipes/blob/main/recipes/rust/speech-to-text/v1/search/README.md This is an example of the expected output when content search is enabled. It shows the 'search' array with terms, hits, start/end times, and confidence, along with the transcript and found term. ```json Full Response: { "search": [ { "term": "NASA", "hits": [ { "start": 5.2, "end": 5.7, "confidence": 0.95 } ] } ], "channels": [...], ... } Transcript: So that was a big step for NASA. Found search term 'NASA' at 5.20s ``` -------------------------------- ### Run the .NET Example Source: https://github.com/deepgram/recipes/blob/main/recipes/dotnet/audio-intelligence/v1/entities/README.md Command to execute the .NET application after setting the required environment variables. ```bash dotnet run ``` -------------------------------- ### Sample Output Display Source: https://github.com/deepgram/recipes/blob/main/recipes/javascript/text-to-speech/v1/bit-rate/README.md Example of the console output indicating file size and configuration parameters. ```text Saved output.mp3 (12345 bytes) — encoding: mp3, bit_rate: 48000 ``` -------------------------------- ### Run Sentiment Analysis Example Source: https://github.com/deepgram/recipes/blob/main/recipes/python/audio-intelligence/v1/sentiment/README.md Execute the Python script to perform sentiment analysis on audio. Ensure the DEEPGRAM_API_KEY environment variable is set and dependencies are installed. ```bash python example.py ``` -------------------------------- ### Example Utterance Response Structure Source: https://github.com/deepgram/recipes/blob/main/recipes/dotnet/speech-to-text/v1/utterances/README.md When `Utterances=true`, the response includes utterance data under `response.Results.Utterances`. Each utterance provides `Start`, `End`, `Transcript`, and optionally `Speaker` information. ```json [0.5s - 3.2s] Yeah, as much as it's worth, I mean, you know. [3.8s - 7.1s] From a scientific standpoint, it's fascinating. [7.5s - 11.2s] The data we're collecting here is unprecedented. ``` -------------------------------- ### Run Entity Detection Script Source: https://github.com/deepgram/recipes/blob/main/recipes/cli/audio-intelligence/v1/entities/README.md Execute this bash script to run the entity detection example. Ensure you have `curl` and `python3` installed and the `DEEPGRAM_API_KEY` environment variable set. ```bash bash example.sh ``` -------------------------------- ### Run Custom TTS Voice Agent Configuration Source: https://github.com/deepgram/recipes/blob/main/recipes/java/voice-agents/v1/custom-tts/README.md Execute the Java example to configure the voice agent with custom TTS settings. Ensure you have Java 11+ and Maven 3.9+ installed, and the DEEPGRAM_API_KEY environment variable is set. ```bash cd recipes/java/voice-agents/v1/custom-tts mvn exec:java -Dexec.mainClass="Example" ``` -------------------------------- ### Run Text-to-Speech Stream Example Source: https://github.com/deepgram/recipes/blob/main/recipes/java/text-to-speech/v1/stream-audio/README.md Commands to navigate to the project directory and execute the Java application. ```bash cd recipes/java/text-to-speech/v1/stream-audio mvn exec:java -Dexec.mainClass="Example" ``` -------------------------------- ### Install Deepgram CLI Source: https://github.com/deepgram/recipes/blob/main/recipes/cli/speech-to-text/v1/detect-entities/README.md Use this command to install the Deepgram CLI. Ensure you have curl installed. ```bash curl -fsSL https://deepgram.com/install.sh | sh ``` -------------------------------- ### View Example Output Source: https://github.com/deepgram/recipes/blob/main/recipes/java/text-to-speech/v1/select-encoding/README.md Shows the expected console output after successfully generating audio with a specified encoding. ```text Audio saved: output.wav (96144 bytes, encoding: linear16) ``` -------------------------------- ### Example Sentiment Analysis Output Source: https://github.com/deepgram/recipes/blob/main/recipes/cli/text-analysis/v1/sentiment/README.md This is an example of the output format when sentiment analysis is enabled. ```text Sentiment: positive (0.93) ``` -------------------------------- ### View Example Output Source: https://github.com/deepgram/recipes/blob/main/recipes/go/text-to-speech/v1/stream-audio/README.md Displays the expected console output when streaming audio successfully. ```text Streamed audio: 12345 bytes Content-Type: audio/wav ``` -------------------------------- ### Format New SDK Review Summary Source: https://github.com/deepgram/recipes/blob/main/instructions/engineer.md Formats a summary for human review when a 'new-sdk' action is detected. This includes issue details and instructions for manual onboarding. ```text === New SDK Requires Human Review === Issue: #{number} — {title} Created: {createdAt} This issue was created because a new Deepgram SDK repository was discovered that is not tracked in .deepgram/sdks.json. To onboard this SDK: 1. Review the issue body for the repository name and language 2. Visit the GitHub repository and confirm it is an official Deepgram SDK 3. Edit .deepgram/sdks.json and add an entry: { "language": "{language}", "slug": "{language}", "repo": "{full_repo_name}", "manifest": "{appropriate manifest filename}" } 4. Create the recipes/{language}/ directory with an appropriate manifest file 5. Manually create a `test-{language}.yml` workflow — this CANNOT be done by an agent. Workflow files require the `workflows` GitHub token scope, which is not available to automated runs. The workflow also will not take effect until it is merged into main. A human must add this file via a separate PR. 6. Close the issue once onboarding is complete No automated action has been taken. Human review is required. === ``` -------------------------------- ### Example Paragraph Output Source: https://github.com/deepgram/recipes/blob/main/recipes/go/speech-to-text/v1/paragraphs/README.md This is an example of the structured output when paragraph segmentation is enabled. Each paragraph is clearly delineated. ```text Paragraphs: Paragraph 1: That's one small step for man, one giant leap for mankind. ``` -------------------------------- ### Example output Source: https://github.com/deepgram/recipes/blob/main/recipes/python/text-to-speech/v1/generate-audio/README.md The expected console output after successfully saving the audio file. ```text Saved output.mp3: 48320 bytes (audio/mpeg) ``` -------------------------------- ### Example Output of Audio Streaming Source: https://github.com/deepgram/recipes/blob/main/recipes/cli/text-to-speech/v1/stream-audio/README.md This is an example of the output you might see when audio is successfully streamed to stdout. ```text Streamed 15432 bytes of audio to stdout ``` -------------------------------- ### Example Transcript Output with Replacements Source: https://github.com/deepgram/recipes/blob/main/recipes/go/speech-to-text/v1/replace/README.md This is an example of how the transcript output will appear after the specified find and replace rules have been applied. ```text Transcript (with replacements): That's one small step for person, one giant leap for humankind. ``` -------------------------------- ### Example Text Summarization Output Source: https://github.com/deepgram/recipes/blob/main/recipes/java/text-analysis/v1/summarize/README.md This is an example of the output format for text summarization. It provides a concise summary of the input text. ```text Summary: Deepgram provides AI-powered speech recognition and text-to-speech APIs with high accuracy, along with audio intelligence features accessible through multiple language SDKs. ``` -------------------------------- ### Example Output of Key Term Prompting Source: https://github.com/deepgram/recipes/blob/main/recipes/java/speech-to-text/v1/keyterm/README.md This is an example of how the transcription output might look when using key term prompting. ```text Yeah, and it's prior to them coming back in, they have to do a suit check on the ISS ... ``` -------------------------------- ### Example Text Summarization Output Source: https://github.com/deepgram/recipes/blob/main/recipes/go/text-analysis/v1/summarize/README.md This is an example of the concise summary generated by the Deepgram text analysis API for the input text. ```text Summary: Deepgram provides speech AI APIs including Nova-3 for transcription and Aura for text-to-speech, supporting real-time and pre-recorded audio across multiple languages. ``` -------------------------------- ### Example Output of Utterances Source: https://github.com/deepgram/recipes/blob/main/recipes/go/speech-to-text/v1/utterances/README.md This is an example of the structured output provided by Deepgram's utterance detection, showing speaker turns and timestamps. ```text Utterances: Utterance 1 (Speaker 0): That's one small step for man, one giant leap for mankind. Start: 0.50s, End: 4.20s ``` -------------------------------- ### Check Required Files in Sample Directory Source: https://github.com/deepgram/recipes/blob/main/instructions/lead-reconcile.md Iterates through each sample directory to verify the presence of an example file, a test file (with language-specific naming conventions), and a README.md file. Reports directories that are missing any of these required files. ```bash # Check each directory for dir in $(find recipes/ -mindepth 4 -maxdepth 4 -type d); do has_example=$(find "$dir" -maxdepth 1 -name "example.*" ! -name "*_test*" ! -name "*.mod" 2>/dev/null | head -1) # NOTE: .NET uses ExampleTest.cs (PascalCase), Java/Rust use subdirectories has_test=$(find "$dir" -maxdepth 1 \( -name "example_test.*" -o -name "example.test.*" -o -name "ExampleTest.*" -o -name "example_test.sh" \) 2>/dev/null | head -1) # For Java and Rust, test files are in subdirectories — always treat as having tests if echo "$dir" | grep -qE "/java/|/rust/"; then has_test="yes"; fi has_readme=$([ -f "$dir/README.md" ] && echo "yes" || echo "") if [ -z "$has_example" ] || [ -z "$has_test" ] || [ -z "$has_readme" ]; then echo "INCOMPLETE: $dir" [ -z "$has_example" ] && echo " - Missing: example file" [ -z "$has_test" ] && echo " - Missing: test file" [ -z "$has_readme" ] && echo " - Missing: README.md" fi done ``` -------------------------------- ### Example Output of Key Term Prompting Source: https://github.com/deepgram/recipes/blob/main/recipes/rust/speech-to-text/v1/keyterm/README.md This is a sample output demonstrating how key term prompting can improve the recognition of specific phrases. ```text NASA, that's one small step for man, one giant leap for mankind. ``` -------------------------------- ### Example Profanity Filtered Transcript Output Source: https://github.com/deepgram/recipes/blob/main/recipes/go/speech-to-text/v1/profanity-filter/README.md This is an example of how a transcript appears when the profanity filter is enabled. Profane words are replaced with asterisks. ```text Transcript (profanity filtered): That's one small step for man, one giant leap for mankind. ``` -------------------------------- ### Run the Custom LLM Voice Agent Example Source: https://github.com/deepgram/recipes/blob/main/recipes/java/voice-agents/v1/custom-llm/README.md Executes the Java voice agent application configured for a custom LLM provider. ```bash cd recipes/java/voice-agents/v1/custom-llm mvn exec:java -Dexec.mainClass="Example" ``` -------------------------------- ### Example Entity Detection Output Source: https://github.com/deepgram/recipes/blob/main/recipes/cli/audio-intelligence/v1/entities/README.md This is an example of the output format when named entity detection is enabled. It shows classified entities with their types. ```text DATE: March 18th, 1965 PERSON: Alexei Leonov ORG: NASA ``` -------------------------------- ### List Instructions Directory Source: https://github.com/deepgram/recipes/blob/main/instructions/vp.md Lists the contents of the instructions directory. Use this to see available instruction files. ```bash ls instructions/ ``` -------------------------------- ### Set Deepgram API Key and Install Dependencies Source: https://github.com/deepgram/recipes/blob/main/recipes/javascript/speech-to-text/v1/filler-words/README.md Set your Deepgram API key as an environment variable and install the necessary Node.js dependencies. ```bash export DEEPGRAM_API_KEY="your-api-key" npm install ``` -------------------------------- ### Fetch SDK README Source: https://github.com/deepgram/recipes/blob/main/instructions/generate-examples.md Retrieves the README file for a specified SDK repository to get an overview of its API. The first 300 lines are usually sufficient. ```bash gh api "repos/{repo}/readme" --jq '.content' | base64 -d | head -300 ``` -------------------------------- ### Example Output for Single-Channel Audio Source: https://github.com/deepgram/recipes/blob/main/recipes/dotnet/speech-to-text/v1/multichannel/README.md This is an example of the output when processing single-channel audio with Multichannel enabled. It shows a single channel with its corresponding transcript. ```text Found 1 audio channel(s): Channel 0: Yeah, as much as it's worth, I mean, you know... ``` -------------------------------- ### Load SDK and Feature Configuration Files Source: https://github.com/deepgram/recipes/blob/main/instructions/pm.md Reads the `sdks.json` and `features.json` files from the repository root. `sdks.json` contains information about tracked SDKs, and `features.json` lists all expected recipe paths. ```bash cat .deepgram/sdks.json cat .deepgram/features.json ``` -------------------------------- ### Example Sentiment Analysis Output Source: https://github.com/deepgram/recipes/blob/main/recipes/dotnet/audio-intelligence/v1/sentiment/README.md This is an example of the output format for sentiment analysis, showing the classification, text, and confidence score for each speech segment. ```text Sentiment Analysis: [positive] NASA announces a successful spacewalk mission where astronauts completed repairs. Confidence: 0.85 [neutral] The six-hour operation involved two crew members working outside the station. Confidence: 0.92 [positive] The mission restored full power generation capability to the space station. Confidence: 0.78 ``` -------------------------------- ### Check Existing Recipe Coverage Source: https://github.com/deepgram/recipes/blob/main/instructions/generate-examples.md Finds all existing example files for a given language to determine which recipes have already been generated. It excludes test files and `.mod` files. ```bash find "recipes/{language}/" -name "example.*" ! -name "*_test*" ! -name "*.mod" 2>/dev/null | \ sed "s|recipes/{language}/||" | sed "s|/example.*||" | sort ```