Skip to content

Commit 8545815

Browse files
authored
Merge pull request #19 from Heterod0x/vapi_hackathon_frontend
Vapi hackathon frontend
2 parents 067dd0b + 5d0309e commit 8545815

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
11
# Oto
2+
23
![Oto Thumbnail](./docs/images/thumbnail.png)
34

45
[![Netlify Status](https://api.netlify.com/api/v1/badges/d3c17ad7-6bee-48d3-abe2-cb239051aa5a/deploy-status)](https://app.netlify.com/projects/oto-evm/deploys)
56

67
## Vision
8+
79
Turning the world's conversations into data
810

911
## Overview
12+
1013
There is almost no data of real-life conversations on the internet. This means speech-AI training data is drastically scarcer than text—something we have verified empirically. oto is a project that pairs a wearable voice-capture device with a smartphone app to turn daily conversations around the world into structured data. For speakers of major languages, oto unlocks personalized services—automatic task management, meeting notes, health insights. For under-represented languages and heavy accents, users can monetize their uploads by licensing data to AI firms. These incentives let us map global conversation flow, creating a speech-based Google Trends or Maps.
1114

1215
## The problem oto solves
16+
1317
There is a global shortage of voice data for AI training.
18+
1419
- Out of approximately 7,000 languages worldwide, voice AI supports only around 150—meaning 98% of languages remain unsupported.
1520
- Even in major languages like English, speech models still perform poorly with accents and dialects.
1621
- Voice AI systems are still unable to engage in human-level natural conversation.
17-
All of these limitations stem from a fundamental lack of high-quality, diverse training data.
18-
One notable initiative is Mozilla Common Voice, which treats voice as a public good. However, it still falls short in terms of dataset volume and diversity.
19-
We aim to address this problem by building on the public-good model and introducing DePIN-style token incentives to accelerate the creation and sharing of diverse, real-world voice data at scale.
22+
All of these limitations stem from a fundamental lack of high-quality, diverse training data.
23+
One notable initiative is Mozilla Common Voice, which treats voice as a public good. However, it still falls short in terms of dataset volume and diversity.
24+
We aim to address this problem by building on the public-good model and introducing DePIN-style token incentives to accelerate the creation and sharing of diverse, real-world voice data at scale.
2025

2126
## Pitch Silde
27+
2228
https://www.figma.com/slides/zENm8UTvypmVpUscp14Imc/oto---Pitch-Deck?node-id=5-45&t=3RG8vMWEwdsLl8zv-0
2329

2430
## Product Page (Colosseum)
@@ -37,6 +43,10 @@ https://www.figma.com/slides/zENm8UTvypmVpUscp14Imc/oto---Pitch-Deck?node-id=5-4
3743

3844
[https://oto-evm.netlify.app/](https://oto-evm.netlify.app/)
3945

46+
## Live Demo for VAPI Hackathon
47+
48+
[https://heterod0x.github.io/oto/](https://heterod0x.github.io/oto/)
49+
4050
## Deployed Contract
4151

4252
[Solscan - otoUzj3eLyJXSkB4DmfGR63eHBMQ9tqPHJaGX8ySSsY](https://solscan.io/account/otoUzj3eLyJXSkB4DmfGR63eHBMQ9tqPHJaGX8ySSsY?cluster=devnets)

frontend_vapi/lib/oto-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ export async function getConversationDetail(
812812
try {
813813
const cleanApiKey = apiKey.replace(/^Bearer\s+/i, "");
814814

815-
const response = await fetch(`${apiEndpoint}/conversation/${conversationId}`, {
815+
const response = await fetch(`${apiEndpoint}/conversation/${conversationId}/transcript`, {
816816
method: "GET",
817817
headers: {
818818
Authorization: `Bearer ${cleanApiKey}`,

frontend_vapi/pages/record.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,8 @@ export default function RecordPage() {
707707
if (wsState === WebSocket.OPEN) {
708708
try {
709709
console.log(`🎤 Sending audio chunk (${event.data.size} bytes) - WebSocket state: ${wsState}`);
710-
// Try binary mode first (raw audio data)
711-
sendRealtimeAudioData(websocketRef.current, event.data, true);
710+
// Send audio data in JSON format (not binary) for server compatibility
711+
sendRealtimeAudioData(websocketRef.current, event.data, false);
712712
} catch (error) {
713713
console.error("❌ Failed to send audio data:", error);
714714
}
@@ -802,17 +802,14 @@ export default function RecordPage() {
802802
console.log(`🎤 Streaming status changed: ${isStreaming}`);
803803
}, [isStreaming]);
804804

805-
// クリーンアップ
805+
// クリーンアップ - only run on component unmount
806806
useEffect(() => {
807807
return () => {
808808
if (isStreaming) {
809809
stopAudioStreaming();
810810
}
811-
if (websocketRef.current) {
812-
websocketRef.current.close();
813-
}
814811
};
815-
}, [isStreaming, stopAudioStreaming]);
812+
}, [stopAudioStreaming]); // Removed isStreaming from dependencies to prevent cleanup on state change
816813

817814
if (!authenticated) {
818815
return null;

0 commit comments

Comments
 (0)