Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: removing missing code and updating code title #389

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions docs/ten_agent/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ The code to handle audio input/output and transcribed text is in src/manager/rtc

Example of joining a channel:

{% code title=">_ Terminal" %}
```bash
{% code title="src/manager/rtc/rtc.ts" %}
```typescript
async join({ channel, userId }: { channel: string; userId: number }) {
if (!this._joined) {
const res = await apiGenAgoraData({ channel, userId });
Expand All @@ -147,17 +147,4 @@ async join({ channel, userId }: { channel: string; userId: number }) {
}
}
```
{% endcode %}

The text message is transmitted from the agent server to the web app via the Stream Message callback:

{% code title=">_ Terminal" %}
```bash
const onStreamMessage = (message: any) => {
const { text } = message;
if (text) {
this.setState({ text });
}
};
```
{% endcode %}
{% endcode %}
Loading