synapse.ml.services.speech package
Submodules
synapse.ml.services.speech.ConversationTranscription module
- class synapse.ml.services.speech.ConversationTranscription.ConversationTranscription(java_obj=None, audioDataCol=None, endpointId=None, extraFfmpegArgs=[], fileType=None, fileTypeCol=None, format=None, formatCol=None, language=None, languageCol=None, outputCol=None, participantsJson=None, participantsJsonCol=None, profanity=None, profanityCol=None, recordAudioData=False, recordedFileNameCol=None, streamIntermediateResults=True, subscriptionKey=None, subscriptionKeyCol=None, url=None, wordLevelTimestamps=None, wordLevelTimestampsCol=None)[source]
Bases:
ComplexParamsMixin
,JavaMLReadable
,JavaMLWritable
,JavaTransformer
- Parameters:
audioDataCol¶ (str) – Column holding audio data, must be either ByteArrays or Strings representing file URIs
extraFfmpegArgs¶ (list) – extra arguments to for ffmpeg output decoding
fileType¶ (object) – The file type of the sound files, supported types: wav, ogg, mp3
format¶ (object) – Specifies the result format. Accepted values are simple and detailed. Default is simple.
language¶ (object) – Identifies the spoken language that is being recognized.
participantsJson¶ (object) – a json representation of a list of conversation participants (email, language, user)
profanity¶ (object) – Specifies how to handle profanity in recognition results. Accepted values are masked, which replaces profanity with asterisks, removed, which remove all profanity from the result, or raw, which includes the profanity in the result. The default setting is masked.
recordAudioData¶ (bool) – Whether to record audio data to a file location, for use only with m3u8 streams
recordedFileNameCol¶ (str) – Column holding file names to write audio data to if ``recordAudioData’’ is set to true
streamIntermediateResults¶ (bool) – Whether or not to immediately return itermediate results, or group in a sequence
wordLevelTimestamps¶ (object) – Whether to request timestamps foe each indivdual word
- audioDataCol = Param(parent='undefined', name='audioDataCol', doc='Column holding audio data, must be either ByteArrays or Strings representing file URIs')
- endpointId = Param(parent='undefined', name='endpointId', doc='endpoint for custom speech models')
- extraFfmpegArgs = Param(parent='undefined', name='extraFfmpegArgs', doc='extra arguments to for ffmpeg output decoding')
- fileType = Param(parent='undefined', name='fileType', doc='ServiceParam: The file type of the sound files, supported types: wav, ogg, mp3')
- format = Param(parent='undefined', name='format', doc='ServiceParam: Specifies the result format. Accepted values are simple and detailed. Default is simple. ')
- getAudioDataCol()[source]
- Returns:
Column holding audio data, must be either ByteArrays or Strings representing file URIs
- Return type:
audioDataCol
- getExtraFfmpegArgs()[source]
- Returns:
extra arguments to for ffmpeg output decoding
- Return type:
extraFfmpegArgs
- getFileType()[source]
- Returns:
The file type of the sound files, supported types: wav, ogg, mp3
- Return type:
fileType
- getFormat()[source]
- Returns:
Specifies the result format. Accepted values are simple and detailed. Default is simple.
- Return type:
format
- getLanguage()[source]
- Returns:
Identifies the spoken language that is being recognized.
- Return type:
language
- getParticipantsJson()[source]
- Returns:
a json representation of a list of conversation participants (email, language, user)
- Return type:
participantsJson
- getProfanity()[source]
- Returns:
Specifies how to handle profanity in recognition results. Accepted values are masked, which replaces profanity with asterisks, removed, which remove all profanity from the result, or raw, which includes the profanity in the result. The default setting is masked.
- Return type:
profanity
- getRecordAudioData()[source]
- Returns:
Whether to record audio data to a file location, for use only with m3u8 streams
- Return type:
recordAudioData
- getRecordedFileNameCol()[source]
- Returns:
Column holding file names to write audio data to if ``recordAudioData’’ is set to true
- Return type:
recordedFileNameCol
- getStreamIntermediateResults()[source]
- Returns:
Whether or not to immediately return itermediate results, or group in a sequence
- Return type:
streamIntermediateResults
- getWordLevelTimestamps()[source]
- Returns:
Whether to request timestamps foe each indivdual word
- Return type:
wordLevelTimestamps
- language = Param(parent='undefined', name='language', doc='ServiceParam: Identifies the spoken language that is being recognized. ')
- outputCol = Param(parent='undefined', name='outputCol', doc='The name of the output column')
- participantsJson = Param(parent='undefined', name='participantsJson', doc='ServiceParam: a json representation of a list of conversation participants (email, language, user)')
- profanity = Param(parent='undefined', name='profanity', doc='ServiceParam: Specifies how to handle profanity in recognition results. Accepted values are masked, which replaces profanity with asterisks, removed, which remove all profanity from the result, or raw, which includes the profanity in the result. The default setting is masked. ')
- recordAudioData = Param(parent='undefined', name='recordAudioData', doc='Whether to record audio data to a file location, for use only with m3u8 streams')
- recordedFileNameCol = Param(parent='undefined', name='recordedFileNameCol', doc="Column holding file names to write audio data to if ``recordAudioData'' is set to true")
- setAudioDataCol(value)[source]
- Parameters:
audioDataCol¶ – Column holding audio data, must be either ByteArrays or Strings representing file URIs
- setExtraFfmpegArgs(value)[source]
- Parameters:
extraFfmpegArgs¶ – extra arguments to for ffmpeg output decoding
- setFileType(value)[source]
- Parameters:
fileType¶ – The file type of the sound files, supported types: wav, ogg, mp3
- setFileTypeCol(value)[source]
- Parameters:
fileType¶ – The file type of the sound files, supported types: wav, ogg, mp3
- setFormat(value)[source]
- Parameters:
format¶ – Specifies the result format. Accepted values are simple and detailed. Default is simple.
- setFormatCol(value)[source]
- Parameters:
format¶ – Specifies the result format. Accepted values are simple and detailed. Default is simple.
- setLanguage(value)[source]
- Parameters:
language¶ – Identifies the spoken language that is being recognized.
- setLanguageCol(value)[source]
- Parameters:
language¶ – Identifies the spoken language that is being recognized.
- setParams(audioDataCol=None, endpointId=None, extraFfmpegArgs=[], fileType=None, fileTypeCol=None, format=None, formatCol=None, language=None, languageCol=None, outputCol=None, participantsJson=None, participantsJsonCol=None, profanity=None, profanityCol=None, recordAudioData=False, recordedFileNameCol=None, streamIntermediateResults=True, subscriptionKey=None, subscriptionKeyCol=None, url=None, wordLevelTimestamps=None, wordLevelTimestampsCol=None)[source]
Set the (keyword only) parameters
- setParticipantsJson(value)[source]
- Parameters:
participantsJson¶ – a json representation of a list of conversation participants (email, language, user)
- setParticipantsJsonCol(value)[source]
- Parameters:
participantsJson¶ – a json representation of a list of conversation participants (email, language, user)
- setProfanity(value)[source]
- Parameters:
profanity¶ – Specifies how to handle profanity in recognition results. Accepted values are masked, which replaces profanity with asterisks, removed, which remove all profanity from the result, or raw, which includes the profanity in the result. The default setting is masked.
- setProfanityCol(value)[source]
- Parameters:
profanity¶ – Specifies how to handle profanity in recognition results. Accepted values are masked, which replaces profanity with asterisks, removed, which remove all profanity from the result, or raw, which includes the profanity in the result. The default setting is masked.
- setRecordAudioData(value)[source]
- Parameters:
recordAudioData¶ – Whether to record audio data to a file location, for use only with m3u8 streams
- setStreamIntermediateResults(value)[source]
- Parameters:
streamIntermediateResults¶ – Whether or not to immediately return itermediate results, or group in a sequence
- setWordLevelTimestamps(value)[source]
- Parameters:
wordLevelTimestamps¶ – Whether to request timestamps foe each indivdual word
- setWordLevelTimestampsCol(value)[source]
- Parameters:
wordLevelTimestamps¶ – Whether to request timestamps foe each indivdual word
- streamIntermediateResults = Param(parent='undefined', name='streamIntermediateResults', doc='Whether or not to immediately return itermediate results, or group in a sequence')
- subscriptionKey = Param(parent='undefined', name='subscriptionKey', doc='ServiceParam: the API key to use')
- url = Param(parent='undefined', name='url', doc='Url of the service')
- wordLevelTimestamps = Param(parent='undefined', name='wordLevelTimestamps', doc='ServiceParam: Whether to request timestamps foe each indivdual word')
synapse.ml.services.speech.SpeakerEmotionInference module
- class synapse.ml.services.speech.SpeakerEmotionInference.SpeakerEmotionInference(java_obj=None, AADToken=None, AADTokenCol=None, CustomAuthHeader=None, CustomAuthHeaderCol=None, concurrency=1, concurrentTimeout=None, customHeaders=None, customHeadersCol=None, customUrlRoot=None, errorCol='SpeakerEmotionInference_0fa98323bb96_error', handler=None, locale=None, localeCol=None, outputCol='SpeakerEmotionInference_0fa98323bb96_output', subscriptionKey=None, subscriptionKeyCol=None, text=None, textCol=None, timeout=60.0, url=None, voiceName=None, voiceNameCol=None)[source]
Bases:
ComplexParamsMixin
,JavaMLReadable
,JavaMLWritable
,JavaTransformer
- Parameters:
CustomAuthHeader¶ (object) – A Custom Value for Authorization Header
concurrentTimeout¶ (float) – max number seconds to wait on futures if concurrency >= 1
customHeaders¶ (object) – Map of Custom Header Key-Value Tuples.
customUrlRoot¶ (str) – The custom URL root for the service. This will not append OpenAI specific model path completions (i.e. /chat/completions) to the URL.
handler¶ (object) – Which strategy to use when handling requests
timeout¶ (float) – number of seconds to wait before closing the connection
voiceName¶ (object) – The name of the voice used for synthesis
- AADToken = Param(parent='undefined', name='AADToken', doc='ServiceParam: AAD Token used for authentication')
- CustomAuthHeader = Param(parent='undefined', name='CustomAuthHeader', doc='ServiceParam: A Custom Value for Authorization Header')
- concurrency = Param(parent='undefined', name='concurrency', doc='max number of concurrent calls')
- concurrentTimeout = Param(parent='undefined', name='concurrentTimeout', doc='max number seconds to wait on futures if concurrency >= 1')
- customHeaders = Param(parent='undefined', name='customHeaders', doc='ServiceParam: Map of Custom Header Key-Value Tuples.')
- customUrlRoot = Param(parent='undefined', name='customUrlRoot', doc='The custom URL root for the service. This will not append OpenAI specific model path completions (i.e. /chat/completions) to the URL.')
- errorCol = Param(parent='undefined', name='errorCol', doc='column to hold http errors')
- getConcurrentTimeout()[source]
- Returns:
max number seconds to wait on futures if concurrency >= 1
- Return type:
concurrentTimeout
- getCustomAuthHeader()[source]
- Returns:
A Custom Value for Authorization Header
- Return type:
CustomAuthHeader
- getCustomHeaders()[source]
- Returns:
Map of Custom Header Key-Value Tuples.
- Return type:
customHeaders
- getCustomUrlRoot()[source]
- Returns:
The custom URL root for the service. This will not append OpenAI specific model path completions (i.e. /chat/completions) to the URL.
- Return type:
customUrlRoot
- getTimeout()[source]
- Returns:
number of seconds to wait before closing the connection
- Return type:
timeout
- handler = Param(parent='undefined', name='handler', doc='Which strategy to use when handling requests')
- locale = Param(parent='undefined', name='locale', doc='ServiceParam: The locale of the input text')
- outputCol = Param(parent='undefined', name='outputCol', doc='The name of the output column')
- setConcurrentTimeout(value)[source]
- Parameters:
concurrentTimeout¶ – max number seconds to wait on futures if concurrency >= 1
- setCustomAuthHeader(value)[source]
- Parameters:
CustomAuthHeader¶ – A Custom Value for Authorization Header
- setCustomAuthHeaderCol(value)[source]
- Parameters:
CustomAuthHeader¶ – A Custom Value for Authorization Header
- setCustomHeaders(value)[source]
- Parameters:
customHeaders¶ – Map of Custom Header Key-Value Tuples.
- setCustomHeadersCol(value)[source]
- Parameters:
customHeaders¶ – Map of Custom Header Key-Value Tuples.
- setCustomUrlRoot(value)[source]
- Parameters:
customUrlRoot¶ – The custom URL root for the service. This will not append OpenAI specific model path completions (i.e. /chat/completions) to the URL.
- setParams(AADToken=None, AADTokenCol=None, CustomAuthHeader=None, CustomAuthHeaderCol=None, concurrency=1, concurrentTimeout=None, customHeaders=None, customHeadersCol=None, customUrlRoot=None, errorCol='SpeakerEmotionInference_0fa98323bb96_error', handler=None, locale=None, localeCol=None, outputCol='SpeakerEmotionInference_0fa98323bb96_output', subscriptionKey=None, subscriptionKeyCol=None, text=None, textCol=None, timeout=60.0, url=None, voiceName=None, voiceNameCol=None)[source]
Set the (keyword only) parameters
- setTimeout(value)[source]
- Parameters:
timeout¶ – number of seconds to wait before closing the connection
- subscriptionKey = Param(parent='undefined', name='subscriptionKey', doc='ServiceParam: the API key to use')
- text = Param(parent='undefined', name='text', doc='ServiceParam: The text to annotate with inferred emotion')
- timeout = Param(parent='undefined', name='timeout', doc='number of seconds to wait before closing the connection')
- url = Param(parent='undefined', name='url', doc='Url of the service')
- voiceName = Param(parent='undefined', name='voiceName', doc='ServiceParam: The name of the voice used for synthesis')
synapse.ml.services.speech.SpeechToText module
- class synapse.ml.services.speech.SpeechToText.SpeechToText(java_obj=None, AADToken=None, AADTokenCol=None, CustomAuthHeader=None, CustomAuthHeaderCol=None, audioData=None, audioDataCol=None, concurrency=1, concurrentTimeout=None, customHeaders=None, customHeadersCol=None, customUrlRoot=None, errorCol='SpeechToText_5eedc7be09f0_error', format=None, formatCol=None, handler=None, language=None, languageCol=None, outputCol='SpeechToText_5eedc7be09f0_output', profanity=None, profanityCol=None, subscriptionKey=None, subscriptionKeyCol=None, timeout=60.0, url=None)[source]
Bases:
ComplexParamsMixin
,JavaMLReadable
,JavaMLWritable
,JavaTransformer
- Parameters:
CustomAuthHeader¶ (object) – A Custom Value for Authorization Header
audioData¶ (object) – The data sent to the service must be a .wav files
concurrentTimeout¶ (float) – max number seconds to wait on futures if concurrency >= 1
customHeaders¶ (object) – Map of Custom Header Key-Value Tuples.
customUrlRoot¶ (str) – The custom URL root for the service. This will not append OpenAI specific model path completions (i.e. /chat/completions) to the URL.
format¶ (object) – Specifies the result format. Accepted values are simple and detailed. Default is simple.
handler¶ (object) – Which strategy to use when handling requests
language¶ (object) – Identifies the spoken language that is being recognized.
profanity¶ (object) – Specifies how to handle profanity in recognition results. Accepted values are masked, which replaces profanity with asterisks, removed, which remove all profanity from the result, or raw, which includes the profanity in the result. The default setting is masked.
timeout¶ (float) – number of seconds to wait before closing the connection
- AADToken = Param(parent='undefined', name='AADToken', doc='ServiceParam: AAD Token used for authentication')
- CustomAuthHeader = Param(parent='undefined', name='CustomAuthHeader', doc='ServiceParam: A Custom Value for Authorization Header')
- audioData = Param(parent='undefined', name='audioData', doc='ServiceParam: The data sent to the service must be a .wav files ')
- concurrency = Param(parent='undefined', name='concurrency', doc='max number of concurrent calls')
- concurrentTimeout = Param(parent='undefined', name='concurrentTimeout', doc='max number seconds to wait on futures if concurrency >= 1')
- customHeaders = Param(parent='undefined', name='customHeaders', doc='ServiceParam: Map of Custom Header Key-Value Tuples.')
- customUrlRoot = Param(parent='undefined', name='customUrlRoot', doc='The custom URL root for the service. This will not append OpenAI specific model path completions (i.e. /chat/completions) to the URL.')
- errorCol = Param(parent='undefined', name='errorCol', doc='column to hold http errors')
- format = Param(parent='undefined', name='format', doc='ServiceParam: Specifies the result format. Accepted values are simple and detailed. Default is simple. ')
- getAudioData()[source]
- Returns:
The data sent to the service must be a .wav files
- Return type:
audioData
- getConcurrentTimeout()[source]
- Returns:
max number seconds to wait on futures if concurrency >= 1
- Return type:
concurrentTimeout
- getCustomAuthHeader()[source]
- Returns:
A Custom Value for Authorization Header
- Return type:
CustomAuthHeader
- getCustomHeaders()[source]
- Returns:
Map of Custom Header Key-Value Tuples.
- Return type:
customHeaders
- getCustomUrlRoot()[source]
- Returns:
The custom URL root for the service. This will not append OpenAI specific model path completions (i.e. /chat/completions) to the URL.
- Return type:
customUrlRoot
- getFormat()[source]
- Returns:
Specifies the result format. Accepted values are simple and detailed. Default is simple.
- Return type:
format
- getLanguage()[source]
- Returns:
Identifies the spoken language that is being recognized.
- Return type:
language
- getProfanity()[source]
- Returns:
Specifies how to handle profanity in recognition results. Accepted values are masked, which replaces profanity with asterisks, removed, which remove all profanity from the result, or raw, which includes the profanity in the result. The default setting is masked.
- Return type:
profanity
- getTimeout()[source]
- Returns:
number of seconds to wait before closing the connection
- Return type:
timeout
- handler = Param(parent='undefined', name='handler', doc='Which strategy to use when handling requests')
- language = Param(parent='undefined', name='language', doc='ServiceParam: Identifies the spoken language that is being recognized. ')
- outputCol = Param(parent='undefined', name='outputCol', doc='The name of the output column')
- profanity = Param(parent='undefined', name='profanity', doc='ServiceParam: Specifies how to handle profanity in recognition results. Accepted values are masked, which replaces profanity with asterisks, removed, which remove all profanity from the result, or raw, which includes the profanity in the result. The default setting is masked. ')
- setAudioData(value)[source]
- Parameters:
audioData¶ – The data sent to the service must be a .wav files
- setAudioDataCol(value)[source]
- Parameters:
audioData¶ – The data sent to the service must be a .wav files
- setConcurrentTimeout(value)[source]
- Parameters:
concurrentTimeout¶ – max number seconds to wait on futures if concurrency >= 1
- setCustomAuthHeader(value)[source]
- Parameters:
CustomAuthHeader¶ – A Custom Value for Authorization Header
- setCustomAuthHeaderCol(value)[source]
- Parameters:
CustomAuthHeader¶ – A Custom Value for Authorization Header
- setCustomHeaders(value)[source]
- Parameters:
customHeaders¶ – Map of Custom Header Key-Value Tuples.
- setCustomHeadersCol(value)[source]
- Parameters:
customHeaders¶ – Map of Custom Header Key-Value Tuples.
- setCustomUrlRoot(value)[source]
- Parameters:
customUrlRoot¶ – The custom URL root for the service. This will not append OpenAI specific model path completions (i.e. /chat/completions) to the URL.
- setFormat(value)[source]
- Parameters:
format¶ – Specifies the result format. Accepted values are simple and detailed. Default is simple.
- setFormatCol(value)[source]
- Parameters:
format¶ – Specifies the result format. Accepted values are simple and detailed. Default is simple.
- setLanguage(value)[source]
- Parameters:
language¶ – Identifies the spoken language that is being recognized.
- setLanguageCol(value)[source]
- Parameters:
language¶ – Identifies the spoken language that is being recognized.
- setParams(AADToken=None, AADTokenCol=None, CustomAuthHeader=None, CustomAuthHeaderCol=None, audioData=None, audioDataCol=None, concurrency=1, concurrentTimeout=None, customHeaders=None, customHeadersCol=None, customUrlRoot=None, errorCol='SpeechToText_5eedc7be09f0_error', format=None, formatCol=None, handler=None, language=None, languageCol=None, outputCol='SpeechToText_5eedc7be09f0_output', profanity=None, profanityCol=None, subscriptionKey=None, subscriptionKeyCol=None, timeout=60.0, url=None)[source]
Set the (keyword only) parameters
- setProfanity(value)[source]
- Parameters:
profanity¶ – Specifies how to handle profanity in recognition results. Accepted values are masked, which replaces profanity with asterisks, removed, which remove all profanity from the result, or raw, which includes the profanity in the result. The default setting is masked.
- setProfanityCol(value)[source]
- Parameters:
profanity¶ – Specifies how to handle profanity in recognition results. Accepted values are masked, which replaces profanity with asterisks, removed, which remove all profanity from the result, or raw, which includes the profanity in the result. The default setting is masked.
- setTimeout(value)[source]
- Parameters:
timeout¶ – number of seconds to wait before closing the connection
- subscriptionKey = Param(parent='undefined', name='subscriptionKey', doc='ServiceParam: the API key to use')
- timeout = Param(parent='undefined', name='timeout', doc='number of seconds to wait before closing the connection')
- url = Param(parent='undefined', name='url', doc='Url of the service')
synapse.ml.services.speech.SpeechToTextSDK module
- class synapse.ml.services.speech.SpeechToTextSDK.SpeechToTextSDK(java_obj=None, audioDataCol=None, endpointId=None, extraFfmpegArgs=[], fileType=None, fileTypeCol=None, format=None, formatCol=None, language=None, languageCol=None, outputCol=None, participantsJson=None, participantsJsonCol=None, profanity=None, profanityCol=None, recordAudioData=False, recordedFileNameCol=None, streamIntermediateResults=True, subscriptionKey=None, subscriptionKeyCol=None, url=None, wordLevelTimestamps=None, wordLevelTimestampsCol=None)[source]
Bases:
ComplexParamsMixin
,JavaMLReadable
,JavaMLWritable
,JavaTransformer
- Parameters:
audioDataCol¶ (str) – Column holding audio data, must be either ByteArrays or Strings representing file URIs
extraFfmpegArgs¶ (list) – extra arguments to for ffmpeg output decoding
fileType¶ (object) – The file type of the sound files, supported types: wav, ogg, mp3
format¶ (object) – Specifies the result format. Accepted values are simple and detailed. Default is simple.
language¶ (object) – Identifies the spoken language that is being recognized.
participantsJson¶ (object) – a json representation of a list of conversation participants (email, language, user)
profanity¶ (object) – Specifies how to handle profanity in recognition results. Accepted values are masked, which replaces profanity with asterisks, removed, which remove all profanity from the result, or raw, which includes the profanity in the result. The default setting is masked.
recordAudioData¶ (bool) – Whether to record audio data to a file location, for use only with m3u8 streams
recordedFileNameCol¶ (str) – Column holding file names to write audio data to if ``recordAudioData’’ is set to true
streamIntermediateResults¶ (bool) – Whether or not to immediately return itermediate results, or group in a sequence
wordLevelTimestamps¶ (object) – Whether to request timestamps foe each indivdual word
- audioDataCol = Param(parent='undefined', name='audioDataCol', doc='Column holding audio data, must be either ByteArrays or Strings representing file URIs')
- endpointId = Param(parent='undefined', name='endpointId', doc='endpoint for custom speech models')
- extraFfmpegArgs = Param(parent='undefined', name='extraFfmpegArgs', doc='extra arguments to for ffmpeg output decoding')
- fileType = Param(parent='undefined', name='fileType', doc='ServiceParam: The file type of the sound files, supported types: wav, ogg, mp3')
- format = Param(parent='undefined', name='format', doc='ServiceParam: Specifies the result format. Accepted values are simple and detailed. Default is simple. ')
- getAudioDataCol()[source]
- Returns:
Column holding audio data, must be either ByteArrays or Strings representing file URIs
- Return type:
audioDataCol
- getExtraFfmpegArgs()[source]
- Returns:
extra arguments to for ffmpeg output decoding
- Return type:
extraFfmpegArgs
- getFileType()[source]
- Returns:
The file type of the sound files, supported types: wav, ogg, mp3
- Return type:
fileType
- getFormat()[source]
- Returns:
Specifies the result format. Accepted values are simple and detailed. Default is simple.
- Return type:
format
- getLanguage()[source]
- Returns:
Identifies the spoken language that is being recognized.
- Return type:
language
- getParticipantsJson()[source]
- Returns:
a json representation of a list of conversation participants (email, language, user)
- Return type:
participantsJson
- getProfanity()[source]
- Returns:
Specifies how to handle profanity in recognition results. Accepted values are masked, which replaces profanity with asterisks, removed, which remove all profanity from the result, or raw, which includes the profanity in the result. The default setting is masked.
- Return type:
profanity
- getRecordAudioData()[source]
- Returns:
Whether to record audio data to a file location, for use only with m3u8 streams
- Return type:
recordAudioData
- getRecordedFileNameCol()[source]
- Returns:
Column holding file names to write audio data to if ``recordAudioData’’ is set to true
- Return type:
recordedFileNameCol
- getStreamIntermediateResults()[source]
- Returns:
Whether or not to immediately return itermediate results, or group in a sequence
- Return type:
streamIntermediateResults
- getWordLevelTimestamps()[source]
- Returns:
Whether to request timestamps foe each indivdual word
- Return type:
wordLevelTimestamps
- language = Param(parent='undefined', name='language', doc='ServiceParam: Identifies the spoken language that is being recognized. ')
- outputCol = Param(parent='undefined', name='outputCol', doc='The name of the output column')
- participantsJson = Param(parent='undefined', name='participantsJson', doc='ServiceParam: a json representation of a list of conversation participants (email, language, user)')
- profanity = Param(parent='undefined', name='profanity', doc='ServiceParam: Specifies how to handle profanity in recognition results. Accepted values are masked, which replaces profanity with asterisks, removed, which remove all profanity from the result, or raw, which includes the profanity in the result. The default setting is masked. ')
- recordAudioData = Param(parent='undefined', name='recordAudioData', doc='Whether to record audio data to a file location, for use only with m3u8 streams')
- recordedFileNameCol = Param(parent='undefined', name='recordedFileNameCol', doc="Column holding file names to write audio data to if ``recordAudioData'' is set to true")
- setAudioDataCol(value)[source]
- Parameters:
audioDataCol¶ – Column holding audio data, must be either ByteArrays or Strings representing file URIs
- setExtraFfmpegArgs(value)[source]
- Parameters:
extraFfmpegArgs¶ – extra arguments to for ffmpeg output decoding
- setFileType(value)[source]
- Parameters:
fileType¶ – The file type of the sound files, supported types: wav, ogg, mp3
- setFileTypeCol(value)[source]
- Parameters:
fileType¶ – The file type of the sound files, supported types: wav, ogg, mp3
- setFormat(value)[source]
- Parameters:
format¶ – Specifies the result format. Accepted values are simple and detailed. Default is simple.
- setFormatCol(value)[source]
- Parameters:
format¶ – Specifies the result format. Accepted values are simple and detailed. Default is simple.
- setLanguage(value)[source]
- Parameters:
language¶ – Identifies the spoken language that is being recognized.
- setLanguageCol(value)[source]
- Parameters:
language¶ – Identifies the spoken language that is being recognized.
- setParams(audioDataCol=None, endpointId=None, extraFfmpegArgs=[], fileType=None, fileTypeCol=None, format=None, formatCol=None, language=None, languageCol=None, outputCol=None, participantsJson=None, participantsJsonCol=None, profanity=None, profanityCol=None, recordAudioData=False, recordedFileNameCol=None, streamIntermediateResults=True, subscriptionKey=None, subscriptionKeyCol=None, url=None, wordLevelTimestamps=None, wordLevelTimestampsCol=None)[source]
Set the (keyword only) parameters
- setParticipantsJson(value)[source]
- Parameters:
participantsJson¶ – a json representation of a list of conversation participants (email, language, user)
- setParticipantsJsonCol(value)[source]
- Parameters:
participantsJson¶ – a json representation of a list of conversation participants (email, language, user)
- setProfanity(value)[source]
- Parameters:
profanity¶ – Specifies how to handle profanity in recognition results. Accepted values are masked, which replaces profanity with asterisks, removed, which remove all profanity from the result, or raw, which includes the profanity in the result. The default setting is masked.
- setProfanityCol(value)[source]
- Parameters:
profanity¶ – Specifies how to handle profanity in recognition results. Accepted values are masked, which replaces profanity with asterisks, removed, which remove all profanity from the result, or raw, which includes the profanity in the result. The default setting is masked.
- setRecordAudioData(value)[source]
- Parameters:
recordAudioData¶ – Whether to record audio data to a file location, for use only with m3u8 streams
- setStreamIntermediateResults(value)[source]
- Parameters:
streamIntermediateResults¶ – Whether or not to immediately return itermediate results, or group in a sequence
- setWordLevelTimestamps(value)[source]
- Parameters:
wordLevelTimestamps¶ – Whether to request timestamps foe each indivdual word
- setWordLevelTimestampsCol(value)[source]
- Parameters:
wordLevelTimestamps¶ – Whether to request timestamps foe each indivdual word
- streamIntermediateResults = Param(parent='undefined', name='streamIntermediateResults', doc='Whether or not to immediately return itermediate results, or group in a sequence')
- subscriptionKey = Param(parent='undefined', name='subscriptionKey', doc='ServiceParam: the API key to use')
- url = Param(parent='undefined', name='url', doc='Url of the service')
- wordLevelTimestamps = Param(parent='undefined', name='wordLevelTimestamps', doc='ServiceParam: Whether to request timestamps foe each indivdual word')
synapse.ml.services.speech.TextToSpeech module
- class synapse.ml.services.speech.TextToSpeech.TextToSpeech(java_obj=None, errorCol='TextToSpeech_404ea44b1235_errors', language=None, languageCol=None, locale=None, localeCol=None, outputFileCol=None, outputFormat=None, outputFormatCol=None, subscriptionKey=None, subscriptionKeyCol=None, text=None, textCol=None, url=None, useSSML=None, useSSMLCol=None, voiceName=None, voiceNameCol=None)[source]
Bases:
ComplexParamsMixin
,JavaMLReadable
,JavaMLWritable
,JavaTransformer
- Parameters:
language¶ (object) – The name of the language used for synthesis
outputFileCol¶ (str) – The location of the saved file as an HDFS compliant URI
outputFormat¶ (object) – The format for the output audio can be one of ArraySeq(Raw8Khz8BitMonoMULaw, Riff16Khz16KbpsMonoSiren, Audio16Khz16KbpsMonoSiren, Audio16Khz32KBitRateMonoMp3, Audio16Khz128KBitRateMonoMp3, Audio16Khz64KBitRateMonoMp3, Audio24Khz48KBitRateMonoMp3, Audio24Khz96KBitRateMonoMp3, Audio24Khz160KBitRateMonoMp3, Raw16Khz16BitMonoTrueSilk, Riff16Khz16BitMonoPcm, Riff8Khz16BitMonoPcm, Riff24Khz16BitMonoPcm, Riff8Khz8BitMonoMULaw, Raw16Khz16BitMonoPcm, Raw24Khz16BitMonoPcm, Raw8Khz16BitMonoPcm, Ogg16Khz16BitMonoOpus, Ogg24Khz16BitMonoOpus, Raw48Khz16BitMonoPcm, Riff48Khz16BitMonoPcm, Audio48Khz96KBitRateMonoMp3, Audio48Khz192KBitRateMonoMp3, Ogg48Khz16BitMonoOpus, Webm16Khz16BitMonoOpus, Webm24Khz16BitMonoOpus, Raw24Khz16BitMonoTrueSilk, Raw8Khz8BitMonoALaw, Riff8Khz8BitMonoALaw, Webm24Khz16Bit24KbpsMonoOpus, Audio16Khz16Bit32KbpsMonoOpus, Audio24Khz16Bit48KbpsMonoOpus, Audio24Khz16Bit24KbpsMonoOpus, Raw22050Hz16BitMonoPcm, Riff22050Hz16BitMonoPcm, Raw44100Hz16BitMonoPcm, Riff44100Hz16BitMonoPcm, AmrWb16000Hz)
useSSML¶ (object) – whether to interpret the provided text input as SSML (Speech Synthesis Markup Language). The default value is false.
voiceName¶ (object) – The name of the voice used for synthesis
- errorCol = Param(parent='undefined', name='errorCol', doc='column to hold http errors')
- getOutputFileCol()[source]
- Returns:
The location of the saved file as an HDFS compliant URI
- Return type:
outputFileCol
- getOutputFormat()[source]
- Returns:
The format for the output audio can be one of ArraySeq(Raw8Khz8BitMonoMULaw, Riff16Khz16KbpsMonoSiren, Audio16Khz16KbpsMonoSiren, Audio16Khz32KBitRateMonoMp3, Audio16Khz128KBitRateMonoMp3, Audio16Khz64KBitRateMonoMp3, Audio24Khz48KBitRateMonoMp3, Audio24Khz96KBitRateMonoMp3, Audio24Khz160KBitRateMonoMp3, Raw16Khz16BitMonoTrueSilk, Riff16Khz16BitMonoPcm, Riff8Khz16BitMonoPcm, Riff24Khz16BitMonoPcm, Riff8Khz8BitMonoMULaw, Raw16Khz16BitMonoPcm, Raw24Khz16BitMonoPcm, Raw8Khz16BitMonoPcm, Ogg16Khz16BitMonoOpus, Ogg24Khz16BitMonoOpus, Raw48Khz16BitMonoPcm, Riff48Khz16BitMonoPcm, Audio48Khz96KBitRateMonoMp3, Audio48Khz192KBitRateMonoMp3, Ogg48Khz16BitMonoOpus, Webm16Khz16BitMonoOpus, Webm24Khz16BitMonoOpus, Raw24Khz16BitMonoTrueSilk, Raw8Khz8BitMonoALaw, Riff8Khz8BitMonoALaw, Webm24Khz16Bit24KbpsMonoOpus, Audio16Khz16Bit32KbpsMonoOpus, Audio24Khz16Bit48KbpsMonoOpus, Audio24Khz16Bit24KbpsMonoOpus, Raw22050Hz16BitMonoPcm, Riff22050Hz16BitMonoPcm, Raw44100Hz16BitMonoPcm, Riff44100Hz16BitMonoPcm, AmrWb16000Hz)
- Return type:
outputFormat
- getUseSSML()[source]
- Returns:
whether to interpret the provided text input as SSML (Speech Synthesis Markup Language). The default value is false.
- Return type:
useSSML
- language = Param(parent='undefined', name='language', doc='ServiceParam: The name of the language used for synthesis')
- locale = Param(parent='undefined', name='locale', doc='ServiceParam: The locale of the input text')
- outputFileCol = Param(parent='undefined', name='outputFileCol', doc='The location of the saved file as an HDFS compliant URI')
- outputFormat = Param(parent='undefined', name='outputFormat', doc='ServiceParam: The format for the output audio can be one of ArraySeq(Raw8Khz8BitMonoMULaw, Riff16Khz16KbpsMonoSiren, Audio16Khz16KbpsMonoSiren, Audio16Khz32KBitRateMonoMp3, Audio16Khz128KBitRateMonoMp3, Audio16Khz64KBitRateMonoMp3, Audio24Khz48KBitRateMonoMp3, Audio24Khz96KBitRateMonoMp3, Audio24Khz160KBitRateMonoMp3, Raw16Khz16BitMonoTrueSilk, Riff16Khz16BitMonoPcm, Riff8Khz16BitMonoPcm, Riff24Khz16BitMonoPcm, Riff8Khz8BitMonoMULaw, Raw16Khz16BitMonoPcm, Raw24Khz16BitMonoPcm, Raw8Khz16BitMonoPcm, Ogg16Khz16BitMonoOpus, Ogg24Khz16BitMonoOpus, Raw48Khz16BitMonoPcm, Riff48Khz16BitMonoPcm, Audio48Khz96KBitRateMonoMp3, Audio48Khz192KBitRateMonoMp3, Ogg48Khz16BitMonoOpus, Webm16Khz16BitMonoOpus, Webm24Khz16BitMonoOpus, Raw24Khz16BitMonoTrueSilk, Raw8Khz8BitMonoALaw, Riff8Khz8BitMonoALaw, Webm24Khz16Bit24KbpsMonoOpus, Audio16Khz16Bit32KbpsMonoOpus, Audio24Khz16Bit48KbpsMonoOpus, Audio24Khz16Bit24KbpsMonoOpus, Raw22050Hz16BitMonoPcm, Riff22050Hz16BitMonoPcm, Raw44100Hz16BitMonoPcm, Riff44100Hz16BitMonoPcm, AmrWb16000Hz)')
- setOutputFileCol(value)[source]
- Parameters:
outputFileCol¶ – The location of the saved file as an HDFS compliant URI
- setOutputFormat(value)[source]
- Parameters:
outputFormat¶ – The format for the output audio can be one of ArraySeq(Raw8Khz8BitMonoMULaw, Riff16Khz16KbpsMonoSiren, Audio16Khz16KbpsMonoSiren, Audio16Khz32KBitRateMonoMp3, Audio16Khz128KBitRateMonoMp3, Audio16Khz64KBitRateMonoMp3, Audio24Khz48KBitRateMonoMp3, Audio24Khz96KBitRateMonoMp3, Audio24Khz160KBitRateMonoMp3, Raw16Khz16BitMonoTrueSilk, Riff16Khz16BitMonoPcm, Riff8Khz16BitMonoPcm, Riff24Khz16BitMonoPcm, Riff8Khz8BitMonoMULaw, Raw16Khz16BitMonoPcm, Raw24Khz16BitMonoPcm, Raw8Khz16BitMonoPcm, Ogg16Khz16BitMonoOpus, Ogg24Khz16BitMonoOpus, Raw48Khz16BitMonoPcm, Riff48Khz16BitMonoPcm, Audio48Khz96KBitRateMonoMp3, Audio48Khz192KBitRateMonoMp3, Ogg48Khz16BitMonoOpus, Webm16Khz16BitMonoOpus, Webm24Khz16BitMonoOpus, Raw24Khz16BitMonoTrueSilk, Raw8Khz8BitMonoALaw, Riff8Khz8BitMonoALaw, Webm24Khz16Bit24KbpsMonoOpus, Audio16Khz16Bit32KbpsMonoOpus, Audio24Khz16Bit48KbpsMonoOpus, Audio24Khz16Bit24KbpsMonoOpus, Raw22050Hz16BitMonoPcm, Riff22050Hz16BitMonoPcm, Raw44100Hz16BitMonoPcm, Riff44100Hz16BitMonoPcm, AmrWb16000Hz)
- setOutputFormatCol(value)[source]
- Parameters:
outputFormat¶ – The format for the output audio can be one of ArraySeq(Raw8Khz8BitMonoMULaw, Riff16Khz16KbpsMonoSiren, Audio16Khz16KbpsMonoSiren, Audio16Khz32KBitRateMonoMp3, Audio16Khz128KBitRateMonoMp3, Audio16Khz64KBitRateMonoMp3, Audio24Khz48KBitRateMonoMp3, Audio24Khz96KBitRateMonoMp3, Audio24Khz160KBitRateMonoMp3, Raw16Khz16BitMonoTrueSilk, Riff16Khz16BitMonoPcm, Riff8Khz16BitMonoPcm, Riff24Khz16BitMonoPcm, Riff8Khz8BitMonoMULaw, Raw16Khz16BitMonoPcm, Raw24Khz16BitMonoPcm, Raw8Khz16BitMonoPcm, Ogg16Khz16BitMonoOpus, Ogg24Khz16BitMonoOpus, Raw48Khz16BitMonoPcm, Riff48Khz16BitMonoPcm, Audio48Khz96KBitRateMonoMp3, Audio48Khz192KBitRateMonoMp3, Ogg48Khz16BitMonoOpus, Webm16Khz16BitMonoOpus, Webm24Khz16BitMonoOpus, Raw24Khz16BitMonoTrueSilk, Raw8Khz8BitMonoALaw, Riff8Khz8BitMonoALaw, Webm24Khz16Bit24KbpsMonoOpus, Audio16Khz16Bit32KbpsMonoOpus, Audio24Khz16Bit48KbpsMonoOpus, Audio24Khz16Bit24KbpsMonoOpus, Raw22050Hz16BitMonoPcm, Riff22050Hz16BitMonoPcm, Raw44100Hz16BitMonoPcm, Riff44100Hz16BitMonoPcm, AmrWb16000Hz)
- setParams(errorCol='TextToSpeech_404ea44b1235_errors', language=None, languageCol=None, locale=None, localeCol=None, outputFileCol=None, outputFormat=None, outputFormatCol=None, subscriptionKey=None, subscriptionKeyCol=None, text=None, textCol=None, url=None, useSSML=None, useSSMLCol=None, voiceName=None, voiceNameCol=None)[source]
Set the (keyword only) parameters
- setUseSSML(value)[source]
- Parameters:
useSSML¶ – whether to interpret the provided text input as SSML (Speech Synthesis Markup Language). The default value is false.
- setUseSSMLCol(value)[source]
- Parameters:
useSSML¶ – whether to interpret the provided text input as SSML (Speech Synthesis Markup Language). The default value is false.
- subscriptionKey = Param(parent='undefined', name='subscriptionKey', doc='ServiceParam: the API key to use')
- text = Param(parent='undefined', name='text', doc='ServiceParam: The text to synthesize')
- url = Param(parent='undefined', name='url', doc='Url of the service')
- useSSML = Param(parent='undefined', name='useSSML', doc='ServiceParam: whether to interpret the provided text input as SSML (Speech Synthesis Markup Language). The default value is false.')
- voiceName = Param(parent='undefined', name='voiceName', doc='ServiceParam: The name of the voice used for synthesis')
Module contents
SynapseML is an ecosystem of tools aimed towards expanding the distributed computing framework Apache Spark in several new directions. SynapseML adds many deep learning and data science tools to the Spark ecosystem, including seamless integration of Spark Machine Learning pipelines with Microsoft Cognitive Toolkit (CNTK), LightGBM and OpenCV. These tools enable powerful and highly-scalable predictive and analytical models for a variety of datasources.
SynapseML also brings new networking capabilities to the Spark Ecosystem. With the HTTP on Spark project, users can embed any web service into their SparkML models. In this vein, SynapseML provides easy to use SparkML transformers for a wide variety of Microsoft Cognitive Services. For production grade deployment, the Spark Serving project enables high throughput, sub-millisecond latency web services, backed by your Spark cluster.
SynapseML requires Scala 2.12, Spark 3.0+, and Python 3.6+.