Mac M1: CLI SPX Command not found

hendryman 11 Reputation points
2022-06-27T10:46:06.86+00:00

On my Macbook M1 (20219, MacOS 12.4) I have successfully installed
dotnet-sdk-6.0.301-osx-arm64
and the Speech CLI via
dotnet tool install --global Microsoft.CognitiveServices.Speech.CLI
but when I type
spx help
I get
zsh: command not found: spx

How can I fix this?

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,286 questions
{count} vote

6 answers

Sort by: Most helpful
  1. YutongTie-MSFT 43,411 Reputation points
    2022-07-10T02:35:05.12+00:00

    Hello @hendryman

    If you have installed spx successful but you can not run it, it seems like there is something wrong with your environment var - PATH, especially you are using z shell.

    I have seen a thread which mentioned similar problem and I think you may want to take a look - https://stackoverflow.com/questions/18428374/commands-not-found-on-zsh

    If you still have this issue after set the PATH well, please let us know, we are glad to help you raise a support ticket to investigate your local environment.

    Looking forward to your response and I hope this helps.

    Regards,
    Yutong

    1 person found this answer helpful.
    0 comments No comments

  2. bozolino 5 Reputation points
    2023-02-03T22:04:10.4+00:00

    thanks! tried

    ~/.dotnet/tools/spx

    but received this error

    Unhandled exception. System.BadImageFormatException: Could not load file or assembly '/Users/username/.dotnet/tools/.store/microsoft.cognitiveservices.speech.cli/1.25.0/microsoft.cognitiveservices.speech.cli/1.25.0/tools/net6.0/any/spx.dll'. An attempt was made to load a program with an incorrect format.

    File name: '/Users/username/.dotnet/tools/.store/microsoft.cognitiveservices.speech.cli/1.25.0/microsoft.cognitiveservices.speech.cli/1.25.0/tools/net6.0/any/spx.dll'

    [1] 14615 abort ~/.dotnet/tools/spx

    1 person found this answer helpful.

  3. hendryman 11 Reputation points
    2022-07-10T10:08:23.74+00:00

    Thank you, Yutong. Tried and failed.

    0 comments No comments

  4. bozolino 5 Reputation points
    2023-02-01T20:59:51.08+00:00

    Still not working. Can anyone please help?

    0 comments No comments

  5. Bruce (SqlWork.com) 52,826 Reputation points
    2023-02-03T21:45:38.8233333+00:00

    ls ~/.dotnet/tools

    should show spx as an executable. if it does, then you do not have your $path set correctly to find it.

    you can also run it explicitly:

    ~/.dotnet/tools/spx

    0 comments No comments