This may be useful for anyone who wants to write arcpy python code with their voice. Steps:
- Get a developer API key from OpenAI
-
- Right click
My Computer
>>Click Properties - Properties Window>>Click Set the environment variables
- Environment Variables Window>>Click the New button under variables
- Name it
OPENAI_API_KEY2
and set the value to the key OpenAI has given you, then click Ok.
- Right click
- Run
python speachToCode.py
- The Whisper AI understanding is saved as an audio here:
%USERPROFILE%\Documents\Sound recordings
, and arcpy python code is generated in the response.