-
Notifications
You must be signed in to change notification settings - Fork 11
Add agent stt sdk #127
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
Merged
+2,433
−15
Merged
Add agent stt sdk #127
Changes from 22 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
070fc96
Add Agent STT SDK
17ea8e9
Drop FIXED turn detection from the Pipecat migration plan
1761338
Drop SMART_TURN from the Pipecat migration plan
d4b3724
Add AdditionalVocabEntry to the Agent STT SDK
a9a818d
Default the Agent STT SDK to the linden-1 model
2955fdd
description improvement for versioning
83faebc
add examples for testing purposes
2dfef8e
remove agent url, use generic rt url, with added /agent if needed
f372acd
remove unused msgs from/to the service
f178757
refactor vadmode to better naming and structure
d38c918
remove profile mentions
a4030bc
description update
842f425
rename to AgentSttAsyncclient
c74b33e
remove audio events ans translation config
2e62a42
small printing adjustment
e16cf78
remove windows specific file as the generic microphone works on win anw
55bce14
remove EndOfUtterance msg, as that's superseded by endOfTurn
c866763
remove not real time streaming file
56524ff
remove ConversationConfig , as we wont offer end_of_utterance_silence…
2481a32
Update README.md
giorgosHadji 6228350
Update sdk/agent_stt/pyproject.toml
giorgosHadji a13e79d
Fix Agent STT SDK compatibility with speechmatics-rt 1.1.1 (#131)
dumitrugutu c872dbe
remove vad config references, I have only left the enable vad (or use…
2e54f95
remove renaming
8dd944d
remove plan
9a6cbba
reorder so AgentSTT is first and the voice agent
aa46998
re ordering agent stt -> voice agent
5f1dc05
update readme to be more positive
9aab759
refactor turn config given new spec
f4dcfe1
remove emit _sentences
5cb31dd
assign self.config, if a new TC came in the start_session
c8d20da
move turn_config into its own config, and away from TranscriptionConfig
58354b4
remove unused files in readmes
46d9f68
register callbacks then use context manager
313af95
be explicit about all config variable names
efb8411
on session disconnect
792f451
refresh request_id when a new session reconnects and dont use a stale…
6178767
at missed turn config to start_session
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| name: Release Agent STT SDK | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "agent-stt/v*" | ||
|
|
||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| extract-version: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| version: ${{ steps.extract.outputs.version }} | ||
| steps: | ||
| - name: Extract version from tag | ||
| id: extract | ||
| run: | | ||
| # Extract version from tag (agent-stt/v1.0.0 -> 1.0.0) | ||
| VERSION=${GITHUB_REF#refs/tags/agent-stt/v} | ||
| echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
| echo "Extracted version: $VERSION" | ||
|
|
||
| test-agent-stt: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Test Agent STT SDK | ||
| run: | | ||
| make install-dev | ||
| make lint-agent-stt | ||
| make test-agent-stt | ||
|
|
||
| release-build: | ||
| runs-on: ubuntu-latest | ||
| needs: [extract-version, test-agent-stt] | ||
| outputs: | ||
| version: ${{ needs.extract-version.outputs.version }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.13" | ||
|
|
||
| - name: Update package version in sdk/agent_stt/speechmatics/agent_stt/__init__.py | ||
| run: | | ||
| VERSION="${{ needs.extract-version.outputs.version }}" | ||
| sed -i "s/0\.0\.0/$VERSION/g" ./sdk/agent_stt/speechmatics/agent_stt/__init__.py | ||
| echo "Updated version to: $VERSION" | ||
| cat ./sdk/agent_stt/speechmatics/agent_stt/__init__.py | grep __version__ | ||
|
|
||
| - name: Build Agent STT SDK | ||
| run: | | ||
| make install-dev | ||
| make build-agent-stt | ||
|
|
||
| - name: Upload dist | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: agent-stt-release-dist | ||
| path: sdk/agent_stt/dist/ | ||
|
|
||
| pypi-publish: | ||
| runs-on: ubuntu-latest | ||
| needs: [release-build] | ||
| environment: | ||
| name: pypi-agent-stt | ||
| url: https://pypi.org/project/speechmatics-agent-stt/${{ needs.release-build.outputs.version }} | ||
|
|
||
| steps: | ||
| - name: Retrieve release dist | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: agent-stt-release-dist | ||
| path: dist/ | ||
|
|
||
| - name: Publish to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| packages-dir: dist/ | ||
| password: ${{ secrets.PYPI_ORG_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Agent STT examples | ||
|
|
||
| Set `SPEECHMATICS_API_KEY` first. To point at a local Voice Agent Service, set | ||
| `SPEECHMATICS_RT_URL` (for example `ws://localhost:8000/v2`); the `/agent` segment is appended | ||
| when it is missing. | ||
|
|
||
| The service needs 16 kHz raw PCM, so the file examples take a 16 kHz WAV and default to | ||
| `tests/voice/assets/audio_01_16kHz.wav`. | ||
|
|
||
| | Example | What it shows | | ||
| | --- | --- | | ||
| | [file/main.py](file/main.py) | File transcription with the service's VAD; segments, turn events, transcript at the end | | ||
|
giorgosHadji marked this conversation as resolved.
Outdated
|
||
| | [realtime_file/main.py](realtime_file/main.py) | The same file paced at wall-clock speed, with the lag of each message behind the audio | | ||
| | [client_vad/main.py](client_vad/main.py) | `TurnDetectionMode.EXTERNAL`: the application owns turn boundaries and calls `finalize()`, as Pipecat and LiveKit do | | ||
| | [microphone/main.py](microphone/main.py) | Live microphone with diarization and speaker-labelled transcript (needs `pyaudio`) | | ||
| | [microphone_windows/main.py](microphone_windows/main.py) | The same, set up for Windows: device selection, in-place partials, Ctrl+C shutdown | | ||
|
giorgosHadji marked this conversation as resolved.
Outdated
|
||
|
|
||
| ```bash | ||
| python examples/agent_stt/file/main.py | ||
| python examples/agent_stt/realtime_file/main.py | ||
| python examples/agent_stt/client_vad/main.py | ||
| python examples/agent_stt/microphone/main.py | ||
| py examples\agent_stt\microphone_windows\main.py | ||
| ``` | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.