deepgram.clients.speak.v1.rest.helpers
1# Copyright 2024 Deepgram SDK contributors. All Rights Reserved. 2# Use of this source code is governed by a MIT license that can be found in the LICENSE file. 3# SPDX-License-Identifier: MIT 4 5from .options import SpeakSource 6 7 8def is_text_source(provided_source: SpeakSource) -> bool: 9 """ 10 Check if the provided source is a text source. 11 """ 12 return "text" in provided_source 13 14 15def is_readstream_source(provided_source: SpeakSource) -> bool: 16 """ 17 Check if the provided source is a readstream source. 18 """ 19 return "stream" in provided_source
def
is_text_source( provided_source: Union[deepgram.clients.common.TextSource, deepgram.clients.common.BufferSource, deepgram.clients.common.StreamSource, _io.BufferedReader]) -> bool:
9def is_text_source(provided_source: SpeakSource) -> bool: 10 """ 11 Check if the provided source is a text source. 12 """ 13 return "text" in provided_source
Check if the provided source is a text source.
def
is_readstream_source( provided_source: Union[deepgram.clients.common.TextSource, deepgram.clients.common.BufferSource, deepgram.clients.common.StreamSource, _io.BufferedReader]) -> bool:
16def is_readstream_source(provided_source: SpeakSource) -> bool: 17 """ 18 Check if the provided source is a readstream source. 19 """ 20 return "stream" in provided_source
Check if the provided source is a readstream source.