whatsapp-pi 1.0.19 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,6 +19,13 @@ Pi is a powerful agentic AI coding assistant that operates in your terminal. Thi
19
19
  - **Reliable Messaging**: Queue-based message sending with retry logic
20
20
  - **TUI Integration**: Menu-driven interface for managing connections and contacts
21
21
 
22
+ ## Prerequisites
23
+
24
+ To enable audio features, you need to install OpenAI Whisper:
25
+ ```bash
26
+ python -m pip install -U openai-whisper
27
+ ```
28
+
22
29
  ## Quick Start
23
30
 
24
31
  1. Install the extension:
@@ -33,9 +40,7 @@ pi
33
40
 
34
41
  To automatically connect to WhatsApp on startup (if you are already authenticated):
35
42
  ```bash
36
- pi -w
37
- # or
38
- pi --whatsapp
43
+ pi --whatsapp-pi-online
39
44
  ```
40
45
 
41
46
  3. Use the menu to connect WhatsApp and manage allowed/blocked numbers
@@ -58,8 +63,6 @@ pi -e whatsapp-pi.ts
58
63
 
59
64
  For verbose mode (shows Baileys trace logs for debugging):
60
65
  ```bash
61
- pi -e whatsapp-pi.ts -v
62
- # or
63
66
  pi -e whatsapp-pi.ts --verbose
64
67
  ```
65
68
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatsapp-pi",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "type": "module",
5
5
  "description": "WhatsApp integration extension for Pi",
6
6
  "main": "whatsapp-pi.ts",
@@ -4,12 +4,13 @@ import { promisify } from 'node:util';
4
4
  import { writeFile, mkdir } from 'node:fs/promises';
5
5
  import { join } from 'node:path';
6
6
  import { existsSync } from 'node:fs';
7
+ import { homedir } from 'node:os';
7
8
 
8
9
  const execAsync = promisify(exec);
9
10
 
10
11
  export class AudioService {
11
- private readonly mediaDir = '/home/opc/.pi/whatsapp-medias';
12
- private readonly whisperPath = '/home/opc/.local/bin/whisper';
12
+ private readonly mediaDir = join(homedir(), '.pi', 'whatsapp-medias');
13
+ private readonly whisperPath = process.platform === 'win32' ? 'python -m whisper' : join(homedir(), '.local', 'bin', 'whisper');
13
14
 
14
15
  constructor() {
15
16
  if (!existsSync(this.mediaDir)) {