hume 0.1.0
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 +1 -0
- package/package.json +42 -0
- package/postcss.config.js +7 -0
- package/src/components/HumeWidget.tsx +37 -0
- package/src/index.ts +3 -0
- package/tailwind.config.js +8 -0
- package/tsconfig.json +23 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Hume AI TypeScript SDK
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hume",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Hume AI TypeScript SDK",
|
|
5
|
+
"main": "src/index.ts",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"hume",
|
|
8
|
+
"ai",
|
|
9
|
+
"multimodal",
|
|
10
|
+
"expression",
|
|
11
|
+
"analysis",
|
|
12
|
+
"sentiment",
|
|
13
|
+
"voice",
|
|
14
|
+
"recognition",
|
|
15
|
+
"detection",
|
|
16
|
+
"emotion",
|
|
17
|
+
"speech",
|
|
18
|
+
"audio",
|
|
19
|
+
"vision",
|
|
20
|
+
"expressive",
|
|
21
|
+
"embeddings",
|
|
22
|
+
"communication",
|
|
23
|
+
"learning"
|
|
24
|
+
],
|
|
25
|
+
"author": "Hume AI Dev",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"private": false,
|
|
28
|
+
"dependencies": {},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/react": "^17.0.37",
|
|
31
|
+
"autoprefixer": "^10.4.13",
|
|
32
|
+
"postcss": "^8.4.18",
|
|
33
|
+
"tailwindcss": "^3.2.1",
|
|
34
|
+
"typescript": "^4.5.4"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"react": "^17.0.2"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsc"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
|
|
3
|
+
interface HumeWidgetProps {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default function HumeWidget(props: HumeWidgetProps) {
|
|
9
|
+
const canvasRef = useRef<HTMLCanvasElement>(null);
|
|
10
|
+
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const canvas = canvasRef.current;
|
|
13
|
+
const context = canvas?.getContext("2d");
|
|
14
|
+
if (!canvas || !context) {
|
|
15
|
+
console.log("Missing canvas or canvas context");
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
canvas.width = props.width;
|
|
20
|
+
canvas.height = props.height;
|
|
21
|
+
|
|
22
|
+
const radius = 6;
|
|
23
|
+
const location = { x: canvas.width / 2, y: canvas.height / 2 };
|
|
24
|
+
context.clearRect(0, 0, canvas.width, canvas.height);
|
|
25
|
+
context.beginPath();
|
|
26
|
+
context.arc(location.x, location.y, radius, 0, 2 * Math.PI);
|
|
27
|
+
context.fillStyle = "#3498db";
|
|
28
|
+
context.fill();
|
|
29
|
+
}, []);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div className="gb-neutral-400">
|
|
33
|
+
<canvas ref={canvasRef}></canvas>
|
|
34
|
+
<span>TEST</span>
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
}
|
package/src/index.ts
ADDED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"allowJs": false,
|
|
4
|
+
"allowSyntheticDefaultImports": true,
|
|
5
|
+
"esModuleInterop": true,
|
|
6
|
+
"forceConsistentCasingInFileNames": true,
|
|
7
|
+
"incremental": true,
|
|
8
|
+
"isolatedModules": false,
|
|
9
|
+
"jsx": "react-jsx",
|
|
10
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
11
|
+
"module": "esnext",
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"noEmit": false,
|
|
14
|
+
"noFallthroughCasesInSwitch": true,
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"strict": true,
|
|
18
|
+
"strictNullChecks": true,
|
|
19
|
+
"target": "es6"
|
|
20
|
+
},
|
|
21
|
+
"include": ["**/*.ts", "**/*.tsx"],
|
|
22
|
+
"exclude": ["node_modules"]
|
|
23
|
+
}
|