Skip to content

Adding listen-view with mock-storage#5

Open
Angamanga wants to merge 1 commit into
ushahidi:mainfrom
Angamanga:listen
Open

Adding listen-view with mock-storage#5
Angamanga wants to merge 1 commit into
ushahidi:mainfrom
Angamanga:listen

Conversation

@Angamanga

@Angamanga Angamanga commented May 31, 2026

Copy link
Copy Markdown
Contributor

This PR:

  • Adds a "listen" interface where users can vote up or down on recordings
  • Uses a mockStorage to store userId, audioId and votes

TODO:

  • Make sure audio-URL is working, I have gotten AccessDenied when I try to listen
  • Wire up proper storage with Lambda and DynamoDB

Comment thread src/stores/listen.ts
import { defineStore } from 'pinia'
import { ref, computed } from 'vue'
import api from '@/lib/api'
import { useMockStorageStore } from '@/stores/mockStorage'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use aws here instead

Comment thread src/stores/listen.ts
slots.value[i] = {
...slots.value[i],
sentence: data.metadata?.sentence ?? null,
audioUrl: data.url ?? null,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The audioUrl here comes from the common-voice API but I have had problems accessing it. Check with Bülent :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant