Deepgram Logo

Community

Handling -1 End Field in Deepgram Transcriptions

When using Deepgram's transcription service, some users have encountered an issue where random words in the transcription output have their end field set to -1. This can be problematic, especially when calculating timing data based on transcription results.

Understanding the Issue

In the output transcription data, each word typically includes start and end timestamps. When a word's end timestamp is -1, it suggests a potential data processing error or misconfiguration in the API request.

Example Data

[
  {
    "word": "Hello",
    "start": 10.809999,
    "end": -1,
    "confidence": 0.99121094,
    "speaker": 0,
    "punctuated_word": "Hello"
  }
]

Possible Cause

While the -1 end field might seem unrelated to specific API settings like keywords, it's critical to ensure correct API request formatting and parameters. For instance, misconfigured query parameters, particularly keywords, could contribute indirectly to transcription anomalies.

Correct Formatting of Keywords

When including keywords in your API request, ensure they are URL-encoded properly:

  • For a single keyword, format as: ?keywords=Santa%20Ana:0.25
  • For multiple keywords, format as: ?keywords=Santa%20Ana:0.25&keywords=Shokes:0.25

Refer to Deepgram's documentation on keywords for further details.

Correct Configuration

  • Model: Ensure the appropriate model is selected; for conversational AI, "nova-2-conversationalai" can be used.
  • Encoding and Sample Rate: Correctly configure parameters like encoding (e.g., linear16) and sample_rate (e.g., 48000).

Potential Solution

  1. Check your request parameters for any anomalies.
  2. Validate that all query parameters, especially keywords, are correctly formatted and encoded.
  3. If troubleshooting these aspects fails to resolve the issue, contact Deepgram support for further assistance.

Conclusion

Facing such issues could be indicative of parameter misconfigurations or internal processing errors. However, ensuring proper formatting and configuration of API requests, especially with non-trivial parameters like keywords, can mitigate many common issues.

If issues persist or the system behavior seems inconsistent, reach out to your Deepgram support representative (if you have one) or visit our community for assistance: Deepgram Community

References