Share via

Why Speech CLI tool SPX does not support string query parameters in content URL ?

Anonymous
2023-10-11T03:36:19.5166667+00:00

Hello Speech SPX tool team,

Following doc https://learn.microsoft.com/en-us/azure/ai-services/speech-service/batch-transcription-create?pivots=speech-cli, i'm sending my audio file SAS token URL in Azure Storage Account for batch transcription in below way:

spx batch transcription create --name "test" --content https://k6wustorageaccounttest.blob.core.chinacloudapi.cn/containertest2/8fccb3d0-3815-11ee-bf08-e58097edd330.wav?sp=r&st=2023-10-11T03:24:24Z&se=2023-10-11T11:24:24Z&spr=https&sv=2022-11-02&sr=b&sig=YJj1Cdc16oPAVSl1%2FwvFLbEO%2FS7tDXcn9evMpB9zTg0%3D

but get below error message on string query para in url:

'st' is not recognized as an internal or external command,

operable program or batch file.

'se' is not recognized as an internal or external command,

operable program or batch file.

'spr' is not recognized as an internal or external command,

operable program or batch file.

'sv' is not recognized as an internal or external command,

operable program or batch file.

'sr' is not recognized as an internal or external command,

operable program or batch file.

'sig' is not recognized as an internal or external command,

operable program or batch file.

Do i miss any other config to make it work ?

Thanks.

Azure Speech in Foundry Tools
0 comments No comments

Answer accepted by question author

AI answer

2023-10-11T03:36:19.52+00:00

The reason why the Speech CLI tool SPX does not support string query parameters in content URL is that the Speech CLI tool SPX uses the Windows Command Prompt, terminal, or PowerShell to execute commands. These shells interpret the ampersand character (&) as a command separator, which causes issues when a URL with query parameters is passed as a parameter to the Speech CLI tool SPX. To work around this issue, you can enclose the URL in double quotes (") or single quotes (') to prevent the shell from interpreting the ampersand character as a command separator.

For example, you can modify your command as follows:

spx batch transcription create --name "test" --content "https://k6wustorageaccounttest.blob.core.chinacloudapi.cn/containertest2/8fccb3d0-3815-11ee-bf08-e58097edd330.wav?sp=r&st=2023-10-11T03:24:24Z&se=2023-10-11T11:24:24Z&spr=https&sv=2022-11-02&sr=b&sig=YJj1Cdc16oPAVSl1%2FwvFLbEO%2FS7tDXcn9evMpB9zTg0%3D"

References:

AI-generated content may be incorrect. Read our transparency notes for more information.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.