symposium 0.13.8 → 0.13.9

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.
Files changed (2) hide show
  1. package/Symposium.js +6 -6
  2. package/package.json +1 -1
package/Symposium.js CHANGED
@@ -85,17 +85,17 @@ export default class Symposium {
85
85
  let file;
86
86
  switch (audio.type) {
87
87
  case 'url':
88
- if (!audio.url)
88
+ if (!audio.data)
89
89
  throw new Error('Audio URL is required');
90
90
 
91
- if (audio.url.startsWith('/')) { // Local path
91
+ if (audio.data.startsWith('/')) { // Local path
92
92
  // Get with fs
93
- if (!fs.existsSync(audio.url))
94
- throw new Error('Audio file does not exist at the specified path: ' + audio.url);
93
+ if (!fs.existsSync(audio.data))
94
+ throw new Error('Audio file does not exist at the specified path: ' + audio.data);
95
95
 
96
- file = fs.readFileSync(audio.url);
96
+ file = fs.readFileSync(audio.data);
97
97
  } else {
98
- file = await fetch(audio.url).then(res => res.blob());
98
+ file = await fetch(audio.data).then(res => res.blob());
99
99
  }
100
100
 
101
101
  file = new File([file], 'audio.' + this.getExtFromMime(file.type), {type: file.type});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "symposium",
4
- "version": "0.13.8",
4
+ "version": "0.13.9",
5
5
  "description": "Agents",
6
6
  "main": "index.js",
7
7
  "author": "Domenico Giambra",