Assemble file name for azure audio (#508)
* fix name * document pipeline param --------- Co-authored-by: Randy Shuai <rashuai@microsoft.com>
This commit is contained in:
Родитель
655bbe890b
Коммит
911c2b2340
|
@ -17,9 +17,9 @@ parameters: # parameters are shown up in ADO UI in a build queue time
|
|||
default: false
|
||||
|
||||
- name: ExtraEnv
|
||||
displayName: 'Extra env variable set to CIBW_ENVIRONMENT'
|
||||
displayName: 'Extra env variable set to CIBW_ENVIRONMENT, in form of "A=1 B=2 C=3"'
|
||||
type: string
|
||||
default: 'None=None'
|
||||
default: ''
|
||||
|
||||
variables:
|
||||
CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)]
|
||||
|
|
|
@ -17,9 +17,9 @@ parameters: # parameters are shown up in ADO UI in a build queue time
|
|||
default: false
|
||||
|
||||
- name: ExtraEnv
|
||||
displayName: 'Extra env variable set to CIBW_ENVIRONMENT'
|
||||
displayName: 'Extra env variable set to CIBW_ENVIRONMENT, in form of "A=1 B=2 C=3"'
|
||||
type: string
|
||||
default: 'None=None'
|
||||
default: ''
|
||||
|
||||
variables:
|
||||
CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
parameters:
|
||||
- name: ExtraEnv
|
||||
displayName: 'Extra env variable set to CIBW_ENVIRONMENT'
|
||||
displayName: 'Extra env variable set to CIBW_ENVIRONMENT, in form of "A=1 B=2 C=3"'
|
||||
type: string
|
||||
default: 'None=None'
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
- job: linux
|
||||
|
|
|
@ -128,7 +128,7 @@ AzureInvoker::AzureInvoker(const OrtApi& api, const OrtKernelInfo& info) : BaseK
|
|||
////////////////////// AzureAudioInvoker //////////////////////
|
||||
|
||||
AzureAudioInvoker::AzureAudioInvoker(const OrtApi& api, const OrtKernelInfo& info) : AzureInvoker(api, info) {
|
||||
binary_type_ = TryToGetAttributeWithDefault<std::string>(kBinaryType, "");
|
||||
file_name_ = std::string{"non_exist."} + TryToGetAttributeWithDefault<std::string>(kBinaryType, "wav");
|
||||
}
|
||||
|
||||
void AzureAudioInvoker::Compute(const ortc::Variadic& inputs, ortc::Tensor<std::string>& output) const {
|
||||
|
@ -166,7 +166,7 @@ void AzureAudioInvoker::Compute(const ortc::Variadic& inputs, ortc::Tensor<std::
|
|||
curl_handler.AddForm(CURLFORM_COPYNAME,
|
||||
input_names_[ith_input].data(),
|
||||
CURLFORM_BUFFER,
|
||||
"non_exist." + binary_type_,
|
||||
file_name_.c_str(),
|
||||
CURLFORM_BUFFERPTR,
|
||||
inputs[ith_input]->DataRaw(),
|
||||
CURLFORM_BUFFERLENGTH,
|
||||
|
|
|
@ -23,7 +23,7 @@ struct AzureAudioInvoker : public AzureInvoker {
|
|||
void Compute(const ortc::Variadic& inputs, ortc::Tensor<std::string>& output) const;
|
||||
|
||||
private:
|
||||
std::string binary_type_;
|
||||
std::string file_name_;
|
||||
};
|
||||
|
||||
struct AzureTextInvoker : public AzureInvoker {
|
||||
|
|
Загрузка…
Ссылка в новой задаче