code: def main():
      parser = argparse.ArgumentParser()
  
      parser.add_argument(
          "--access_key",
          help="AccessKey obtained from Picovoice Console (https://console.picovoice.ai/)",
          required=True,
      )
  
      parser.add_argument(
          "--audio_device_index",
          help="Index of input audio device.",
          type=int,
          default=-1,
      )
  
      args = parser.parse_args()
  
      window = tk.Tk()
      window.title("Porcupine Demo")
      window.minsize(width=300, height=400)
  
      keyword_var = tk.StringVar(window)
  
      for x in KEYWORDS:
          tk.Radiobutton(
              window,
              text=x,
              variable=keyword_var,
              value=x,
              indicatoron=False,
          ).pack(fill=tk.X, ipady=5)
  
      porcupine_thread = PorcupineThread(
          access_key=args.access_key,
          device_index=args.audio_device_index,
          keyword_var=keyword_var,
      )
  
      def on_close():
          porcupine_thread.stop()
          while not porcupine_thread.is_stopped():
              pass
          window.destroy()
  
      window.protocol("WM_DELETE_WINDOW", on_close)
  
      porcupine_thread.start()
      while not porcupine_thread.is_ready():
          pass
  
      window.mainloop()
  
file_path: porcupine/demo/tkinter/main.py
imports: import argparse
  import tkinter
  from threading import Thread
  import pvporcupine
  from pvrecorder import PvRecorder
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types