question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Example on README doesn't work

See original GitHub issue

Hi,

The following example on top level README doesn’t work:

from sources import MicrophoneAudioSource
from functional import FrameWiseModel, ChunkWiseModel, OverlappedSpeechPenalty, EmbeddingNormalization

mic = MicrophoneAudioSource(sample_rate=16000)

# Initialize independent modules
segmentation = FrameWiseModel("pyannote/segmentation")
embedding = ChunkWiseModel("pyannote/embedding")
osp = OverlappedSpeechPenalty(gamma=3, beta=10)
normalization = EmbeddingNormalization(norm=1)

# Branch the microphone stream to calculate segmentation
segmentation_stream = mic.stream.pipe(ops.map(segmentation))
# Join audio and segmentation stream to calculate speaker embeddings
embedding_stream = rx.zip(mic.stream, segmentation_stream).pipe(
    ops.starmap(lambda wave, seg: (wave, osp(seg))),
    ops.starmap(embedding),
    ops.map(normalization)
)

embedding_stream.suscribe(on_next=lambda emb: print(emb.shape))

mic.read()

First of all there is a type in declaring variable ops (it’s been declared as osp).

Secondly, in line segmentation_stream = mic.stream.pipe(ops.map(segmentation)), there is no method named map in variable ops.

Thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
abhinavkulkarnicommented, Oct 22, 2021

Thanks, it works!

0reactions
juanmc2005commented, Oct 22, 2021

@KannebTo would you mind creating a separate issue for this? Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Example in readme doesn't work · Issue #2 · qualweb/core
Hi! The code example in README.md doesn't seem to work properly. Firstly (and trivially), the constant earlReports is declared, ...
Read more >
What is README.md File? - GeeksforGeeks
A README file is an essential guide that gives other developers a detailed description of your GitHub project. You may be wondering, ...
Read more >
Doxygen: How to reference a README.md file from my main ...
The "../README.md" doesn't constitute a valid name The "README.md" would work when it is a local file (i.e. local to the doc directory)....
Read more >
Homework: Writing a README
README: A file located in a project's repository that provides detailed information about a project. · Markdown: A simple language that uses marking...
Read more >
How to write a detailed README File - Carimus, LLC
When a project doesn't have a README file, it means nobody can know anything about it unless they dive into its code to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found